]> git.saurik.com Git - wxWidgets.git/blobdiff - src/univ/themes/win32.cpp
avoiding nesting dcs on the same window concurrently
[wxWidgets.git] / src / univ / themes / win32.cpp
index 5aa723165f47ac701fc80e5f3132ccd957d99bef..3f5416cbc8c4f3a7e327e4e8b94786bcdad9ab5f 100644 (file)
     #pragma hdrstop
 #endif
 
+#include "wx/univ/theme.h"
+
+#if wxUSE_THEME_WIN32
+
 #ifndef WX_PRECOMP
     #include "wx/timer.h"
     #include "wx/intl.h"
@@ -65,7 +69,6 @@
 #include "wx/univ/inpcons.h"
 #include "wx/univ/inphand.h"
 #include "wx/univ/colschem.h"
-#include "wx/univ/theme.h"
 
 // ----------------------------------------------------------------------------
 // constants
@@ -1717,7 +1720,7 @@ void wxWin32Renderer::DrawToolBarButton(wxDC& dc,
         {
             int xpoint = (rect.GetLeft() + rect.GetRight() + 1 - bitmap.GetWidth()) / 2;
             int ypoint = (rect.GetTop() + rect.GetBottom() + 1 - bitmap.GetHeight()) / 2;
-            dc.DrawBitmap(bitmap, xpoint, ypoint);
+            dc.DrawBitmap(bitmap, xpoint, ypoint, bitmap.GetMask() != NULL);
         }
     }
     else if (style == wxTOOL_STYLE_SEPARATOR)
@@ -3772,3 +3775,5 @@ bool wxWin32FrameInputHandler::HandleActivation(wxInputConsumer *consumer,
 
     return wxStdInputHandler::HandleActivation(consumer, activated);
 }
+
+#endif // wxUSE_THEME_WIN32