X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3950f9e1650968e7c3a4b05286942461dd52b3cb..58c23da1d54bf50d9f892b692b941f2cd20d96d0:/src/msw/printwin.cpp diff --git a/src/msw/printwin.cpp b/src/msw/printwin.cpp index 99c8ac21e3..0f7103965a 100644 --- a/src/msw/printwin.cpp +++ b/src/msw/printwin.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: printwin.cpp +// Name: src/msw/printwin.cpp // Purpose: wxWindowsPrinter framework // Author: Julian Smart // Modified by: @@ -17,10 +17,6 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma implementation "printwin.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -28,8 +24,6 @@ #pragma hdrstop #endif -#include "wx/defs.h" - // Don't use the Windows printer if we're in wxUniv mode and using // the PostScript architecture #if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXUNIVERSAL__) || !wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) @@ -42,20 +36,17 @@ #include "wx/app.h" #include "wx/msgdlg.h" #include "wx/intl.h" + #include "wx/log.h" + #include "wx/dcprint.h" #endif #include "wx/msw/printwin.h" -#include "wx/dcprint.h" #include "wx/printdlg.h" -#include "wx/log.h" #include "wx/msw/private.h" #include -#include "wx/msw/private.h" - -#include - +#include "wx/msw/wrapcdlg.h" #ifndef __WIN32__ #include #endif @@ -185,7 +176,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 +201,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 +273,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) @@ -428,9 +420,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