X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2bda0e173844e8e0f8acf4e8ad8b5c26e5c6fe5d..c1066cdf62de692cec3b61f68da35263aa17b1c0:/src/msw/printwin.cpp diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index a124a83685..609a04235c 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -171,7 +171,21 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt wxWindow *win = CreateAbortWindow(parent, printout); wxYield(); + +#if defined(__BORLANDC__) || defined(__GNUWIN32__) || !defined(__WIN32__) ::SetAbortProc((HDC) dc->GetHDC(), (FARPROC) lpAbortProc); +#else + ::SetAbortProc((HDC) dc->GetHDC(), (int (_stdcall *) + // cast it to right type only if required + // @@@ it's really cdecl and we're casting it to stdcall - either there is + // something I don't understand or it will crash at first usage + #ifdef STRICT + (HDC, int) + #else + () + #endif + )lpAbortProc); +#endif if (!win) {