]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dcprint.cpp
Rework idle handling so that NSApplication does not need to be subclassed or posed as.
[wxWidgets.git] / src / msw / dcprint.cpp
index 32dad051fee9f63d5b5bafea474973b3e4c17da9..4b514b9e321e8556fbaeabc701ee4b3f370ca52e 100644 (file)
@@ -193,15 +193,13 @@ bool wxPrinterDC::StartDoc(const wxString& message)
     if (!m_hDC)
         return false;
 
-    int ret = ::StartDoc(GetHdc(), &docinfo);
-
-    if (ret <= 0)
+    if ( ::StartDoc(GetHdc(), &docinfo) <= 0 )
     {
-        DWORD lastError = GetLastError();
-        wxLogDebug(wxT("wxDC::StartDoc failed with error: %ld\n"), lastError);
+        wxLogLastError(wxT("StartDoc"));
+        return false;
     }
 
-    return (ret > 0);
+    return true;
 }
 
 void wxPrinterDC::EndDoc()
@@ -399,7 +397,8 @@ void wxPrinterDC::DoDrawBitmap(const wxBitmap& bmp,
     {
         // no support for StretchDIBits() or an error occurred if we got here
         wxMemoryDC memDC;
-        memDC.SelectObject(bmp);
+
+        memDC.SelectObjectAsSource(bmp);
 
         Blit(x, y, width, height, &memDC, 0, 0, wxCOPY, useMask);