]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printwin.cpp
Accelerators now work for wxDialog; wxToolBarSimple fixed when dragging out of
[wxWidgets.git] / src / msw / printwin.cpp
index f60b5747257b436dd4e5f0df09f4de06e44529dd..609a04235c375f66a7c2dc76fa20fc668bd68005 100644 (file)
@@ -172,10 +172,19 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
   wxWindow *win = CreateAbortWindow(parent, printout);
   wxYield();
 
-#if defined(__BORLANDC__) || defined(__GNUWIN32__)
+#if defined(__BORLANDC__) || defined(__GNUWIN32__) || !defined(__WIN32__)
   ::SetAbortProc((HDC) dc->GetHDC(), (FARPROC) lpAbortProc);
 #else
-  ::SetAbortProc((HDC) dc->GetHDC(), (int (_stdcall *)(HDC, int)) lpAbortProc);
+  ::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)