X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6c9a19aabab3a878b565e6c2a5f2a3824277c4dc..d1d276f23104cc30afaceb6beddcba738d5ad2d2:/src/msw/printdlg.cpp diff --git a/src/msw/printdlg.cpp b/src/msw/printdlg.cpp index 380233da94..a2c894079b 100644 --- a/src/msw/printdlg.cpp +++ b/src/msw/printdlg.cpp @@ -17,7 +17,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "printdlg.h" #endif @@ -28,7 +28,9 @@ #pragma hdrstop #endif -#if wxUSE_PRINTING_ARCHITECTURE +// Don't use the Windows print dialog if we're in wxUniv mode and using +// the PostScript architecture +#if wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXUNIVERSAL__) || !wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) #ifndef WX_PRECOMP #include "wx/app.h" @@ -37,11 +39,6 @@ #include "wx/printdlg.h" #include "wx/dcprint.h" -// Have to emulate page setup dialog for Win16 -#if !defined(__WIN95__) - #include "wx/generic/prntdlgg.h" -#endif - #include #include "wx/msw/private.h" @@ -71,7 +68,7 @@ wxPrintDialog::wxPrintDialog() { m_dialogParent = NULL; m_printerDC = NULL; - m_destroyDC = TRUE; + m_destroyDC = true; } wxPrintDialog::wxPrintDialog(wxWindow *p, wxPrintDialogData* data) @@ -92,14 +89,14 @@ bool wxPrintDialog::Create(wxWindow *p, wxPrintDialogData* data) { m_dialogParent = p; m_printerDC = NULL; - m_destroyDC = TRUE; + m_destroyDC = true; if ( data ) m_printDialogData = *data; m_printDialogData.SetOwnerWindow(p); - return TRUE; + return true; } wxPrintDialog::~wxPrintDialog() @@ -124,7 +121,7 @@ int wxPrintDialog::ShowModal() p->hwndOwner = 0; - if ( ret != FALSE && ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC) + if ( ret != false && ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC) { wxPrinterDC *pdc = new wxPrinterDC((WXHDC) ((PRINTDLG *)m_printDialogData.GetNativeData())->hDC); m_printerDC = pdc; @@ -141,7 +138,7 @@ wxDC *wxPrintDialog::GetPrintDC() { if (m_printerDC) { - m_destroyDC = FALSE; + m_destroyDC = false; return m_printerDC; } else @@ -172,7 +169,7 @@ bool wxPageSetupDialog::Create(wxWindow *p, wxPageSetupData *data) #if defined(__WIN95__) m_pageSetupData.SetOwnerWindow(p); #endif - return TRUE; + return true; } wxPageSetupDialog::~wxPageSetupDialog() @@ -203,7 +200,7 @@ int wxPageSetupDialog::ShowModal() wxGenericPageSetupDialog *genericPageSetupDialog = new wxGenericPageSetupDialog(GetParent(), & m_pageSetupData); int ret = genericPageSetupDialog->ShowModal(); m_pageSetupData = genericPageSetupDialog->GetPageSetupData(); - genericPageSetupDialog->Close(TRUE); + genericPageSetupDialog->Close(true); return ret; #endif }