X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd64de596c085f81aa3ef7d8ee6b2f4afebbed8e..9aaf11927c8f43dcf296563c6a62707d625c2356:/src/msw/dcprint.cpp?ds=sidebyside diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index fc748ce751..8636a4447c 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -45,7 +45,8 @@ #include "wx/dcprint.h" #include "wx/printdlg.h" -#include "math.h" +#include "wx/msw/printdlg.h" +#include "wx/math.h" #if wxUSE_COMMON_DIALOGS #include @@ -181,7 +182,7 @@ bool wxPrinterDC::StartDoc(const wxString& message) wxString filename(m_printData.GetFilename()); - if (filename.IsEmpty()) + if (filename.empty()) docinfo.lpszOutput = NULL; else docinfo.lpszOutput = (const wxChar *) filename; @@ -283,9 +284,21 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) // Gets an HDC for the specified printer configuration WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst) { +#if defined(__WXUNIVERSAL__) && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW) + +#if 0 + wxPostScriptPrintNativeData *data = + (wxPostScriptPrintNativeData *) printDataConst.GetNativeData(); + // FIXME: how further ??? +#else + return 0; +#endif + +#else // Postscript vs. native Windows + wxWindowsPrintNativeData *data = (wxWindowsPrintNativeData *) printDataConst.GetNativeData(); - + data->TransferFrom( printDataConst ); wxChar* driverName = (wxChar*) NULL; @@ -327,6 +340,7 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst) GlobalUnlock(hDevMode); return (WXHDC) hDC; +#endif } // ----------------------------------------------------------------------------