X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e5c4c38b5d3523bfac08987b5ec09d34f4f61caa..cb73e6001f891ae46b12a1e4ca39b93649cb6099:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index c0e90e3d2c..f93544cc42 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "dcprint.h" #endif @@ -38,7 +38,11 @@ #if wxUSE_PRINTING_ARCHITECTURE #include "wx/msw/private.h" + +#if wxUSE_WXDIB #include "wx/msw/dib.h" +#endif + #include "wx/dcprint.h" #include "math.h" @@ -225,7 +229,6 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) deviceName.clear(); LPDEVNAMES lpDevNames; - LPTSTR lpszDriverName; LPTSTR lpszDeviceName; LPTSTR lpszPortName; @@ -259,7 +262,6 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) if (pd.hDevNames) { lpDevNames = (LPDEVNAMES)GlobalLock(pd.hDevNames); - lpszDriverName = (LPTSTR)lpDevNames + lpDevNames->wDriverOffset; lpszDeviceName = (LPTSTR)lpDevNames + lpDevNames->wDeviceOffset; lpszPortName = (LPTSTR)lpDevNames + lpDevNames->wOutputOffset; @@ -276,7 +278,7 @@ static bool wxGetDefaultDeviceName(wxString& deviceName, wxString& portName) GlobalFree(pd.hDevMode); pd.hDevMode=NULL; } - return ( deviceName != wxT("") ); + return ( deviceName != wxEmptyString ); } // Gets an HDC for the specified printer configuration @@ -341,6 +343,7 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, const wxBitmap& bmp, wxCoord x, wxCoord y) { +#if wxUSE_WXDIB wxDIB dib(bmp); if ( !dib.IsOk() ) return FALSE; @@ -373,6 +376,9 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, } return TRUE; +#else + return FALSE; +#endif } void wxPrinterDC::DoDrawBitmap(const wxBitmap& bmp, @@ -400,7 +406,7 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap& bmp, bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, wxDC *source, - wxCoord xsrc, wxCoord ysrc, + wxCoord WXUNUSED(xsrc), wxCoord WXUNUSED(ysrc), int WXUNUSED(rop), bool useMask, wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask)) {