]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
ignore clicks on a toolbar but outside any button
[wxWidgets.git] / src / msw / tbar95.cpp
index 0a8217a9ddfe82d0a1f5c37a79f1fc71a0158fea..b734360d7b227b901375f8a03667d24cd42dff6b 100644 (file)
@@ -36,6 +36,7 @@
     #include "wx/settings.h"
     #include "wx/bitmap.h"
     #include "wx/dcmemory.h"
+    #include "wx/control.h"
 #endif
 
 #if wxUSE_TOOLBAR && defined(__WIN95__) && wxUSE_TOOLBAR_NATIVE
@@ -94,6 +95,9 @@
 #ifndef TBSTYLE_FLAT
     #define TBSTYLE_LIST            0x1000
     #define TBSTYLE_FLAT            0x0800
+#endif
+
+#ifndef TBSTYLE_TRANSPARENT
     #define TBSTYLE_TRANSPARENT     0x8000
 #endif
 
@@ -444,12 +448,12 @@ bool wxToolBar::Realize()
         wxToolBarToolBase *tool = node->GetData();
         if ( tool->IsButton() )
         {
-            const wxBitmap& bmp = tool->GetBitmap1();
+            const wxBitmap& bmp = tool->GetNormalBitmap();
             if ( bmp.Ok() )
             {
 #if USE_BITMAP_MASKS
                 // notice the last parameter: do use mask
-                dcAllButtons.DrawBitmap(tool->GetBitmap1(), x, 0, TRUE);
+                dcAllButtons.DrawBitmap(bmp, x, 0, TRUE);
 #else // !USE_BITMAP_MASKS
                 HBITMAP hbmp = GetHbitmapOf(bmp);
                 HBITMAP oldBitmap2 = (HBITMAP)::SelectObject(memoryDC2, hbmp);