]> 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 a2ce8d28941616ebb0b5a8af604e39ba3df4e993..3f5416cbc8c4f3a7e327e4e8b94786bcdad9ab5f 100644 (file)
@@ -24,7 +24,9 @@
     #pragma hdrstop
 #endif
 
-#if wxUSE_ALL_THEMES || wxUSE_THEME_WIN32
+#include "wx/univ/theme.h"
+
+#if wxUSE_THEME_WIN32
 
 #ifndef WX_PRECOMP
     #include "wx/timer.h"
@@ -67,7 +69,6 @@
 #include "wx/univ/inpcons.h"
 #include "wx/univ/inphand.h"
 #include "wx/univ/colschem.h"
-#include "wx/univ/theme.h"
 
 // ----------------------------------------------------------------------------
 // constants
@@ -1719,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)
@@ -3775,4 +3776,4 @@ bool wxWin32FrameInputHandler::HandleActivation(wxInputConsumer *consumer,
     return wxStdInputHandler::HandleActivation(consumer, activated);
 }
 
-#endif // wxUSE_ALL_THEMES || wxUSE_THEME_WIN32
+#endif // wxUSE_THEME_WIN32