X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/999836aacade840a5d9a0cbb5fad7b1d4de62c93..ef0898052549fc7d1c71b1165dafef42c9735cdf:/src/msw/dcprint.cpp diff --git a/src/msw/dcprint.cpp b/src/msw/dcprint.cpp index 17b5533def..819514bb60 100644 --- a/src/msw/dcprint.cpp +++ b/src/msw/dcprint.cpp @@ -195,13 +195,11 @@ bool wxPrinterDC::StartDoc(const wxString& message) int ret = ::StartDoc(GetHdc(), &docinfo); -#ifndef __WIN16__ if (ret <= 0) { DWORD lastError = GetLastError(); wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError); } -#endif return (ret > 0); } @@ -309,15 +307,10 @@ WXHDC WXDLLEXPORT wxGetPrinterDC(const wxPrintData& printDataConst) { // Retrieve the default device name wxString portName; -#ifdef __WXDEBUG__ - bool ret = -#else // !Debug - (void) -#endif // Debug/Release - wxGetDefaultDeviceName(devNameStr, portName); - - wxASSERT_MSG( ret, wxT("Could not get default device name.") ); - + if ( !wxGetDefaultDeviceName(devNameStr, portName) ) + { + return 0; // Could not get default device name + } deviceName = devNameStr.c_str(); } @@ -375,7 +368,7 @@ bool DrawBitmapUsingStretchDIBits(HDC hdc, return FALSE; } - else + return TRUE; #else return FALSE;