]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dc.cpp
wxDIB::Create(wxBitmap) shouldn't do any conversions if the bitmap is already a DIB...
[wxWidgets.git] / src / msw / dc.cpp
index 0bc5904ba81ba8e4b00a2e6118d1ffd31f192cf0..64e2dda0db9d0318d34d99ec4a23aa401558a74c 100644 (file)
@@ -5,7 +5,7 @@
 // Modified by:
 // Created:     01/02/97
 // RCS-ID:      $Id$
-// Copyright:   (c) Julian Smart and Markus Holzem
+// Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
@@ -273,10 +273,12 @@ void wxDC::SelectOldObjects(WXHDC dc)
         if (m_oldBitmap)
         {
             ::SelectObject((HDC) dc, (HBITMAP) m_oldBitmap);
+#ifdef __WXDEBUG__
             if (m_selectedBitmap.Ok())
             {
                 m_selectedBitmap.SetSelectedInto(NULL);
             }
+#endif
         }
         m_oldBitmap = 0;
         if (m_oldPen)
@@ -958,6 +960,10 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
         {
             s_triedToLoad = TRUE;
 
+            // don't give errors about the DLL being unavailable, we're
+            // prepared to handle this
+            wxLogNull nolog;
+
             wxDynamicLibrary dll(_T("msimg32.dll"));
             if ( dll.IsLoaded() )
             {
@@ -965,7 +971,8 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
                 if ( pfnAlphaBlend )
                 {
                     // we must keep the DLL loaded if we want to be able to
-                    // call AlphaBlend() so just never unload it at all
+                    // call AlphaBlend() so just never unload it at all, not a
+                    // big deal
                     dll.Detach();
                 }
             }