]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/printwin.cpp
Fix wxFileConfig for WinCE
[wxWidgets.git] / src / msw / printwin.cpp
index 59e6624042370f3d1a79f5817cf2f33c81622472..cd496d3291d7627229183ab42abadcb3336253c8 100644 (file)
@@ -185,7 +185,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
     wxWindow *win = CreateAbortWindow(parent, printout);
     wxYield();
 
-#if defined(__BORLANDC__) || defined(__GNUWIN32__) || defined(__SALFORDC__) || !defined(__WIN32__)
+#if defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__GNUWIN32__) || defined(__SALFORDC__) || !defined(__WIN32__)
 #ifdef STRICT
     ::SetAbortProc((HDC) dc->GetHDC(), (ABORTPROC) m_lpAbortProc);
 #else
@@ -210,6 +210,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
         sm_lastError = wxPRINTER_ERROR;
 
         delete dc;
+        return false;
     }
     sm_abortWindow = win;
     sm_abortWindow->Show();
@@ -281,7 +282,7 @@ bool wxWindowsPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt
 
     delete dc;
 
-    return (sm_lastError == wxPRINTER_NO_ERROR);
+    return sm_lastError == wxPRINTER_NO_ERROR;
 }
 
 wxDC* wxWindowsPrinter::PrintDialog(wxWindow *parent)
@@ -306,7 +307,7 @@ wxDC* wxWindowsPrinter::PrintDialog(wxWindow *parent)
     return dc;
 }
 
-bool wxWindowsPrinter::Setup(wxWindow *parent)
+bool wxWindowsPrinter::Setup(wxWindow *WXUNUSED(parent))
 {
 #if 0
     // We no longer expose that dialog
@@ -322,7 +323,7 @@ bool wxWindowsPrinter::Setup(wxWindow *parent)
 
     return (ret == wxID_OK);
 #else
-    return wxID_CANCEL;
+    return false;
 #endif
 }
 
@@ -428,9 +429,9 @@ LONG APIENTRY _EXPORT wxAbortProc(HDC WXUNUSED(hPr), int WXUNUSED(Code))
             DispatchMessage(&msg);
         }
 
-        /* bAbort is TRUE (return is FALSE) if the user has aborted */
+    /* bAbort is TRUE (return is FALSE) if the user has aborted */
 
-        return (!wxPrinterBase::sm_abortIt);
+    return !wxPrinterBase::sm_abortIt;
 }
 
 #endif