]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/tbar95.cpp
Added wxDialog::GetToolBar for PocketPC
[wxWidgets.git] / src / msw / tbar95.cpp
index 48a58f45d4d5f1dad340c4f6ce71c8a1c4b9cd77..56df126fa4f3eac1fb03e289e0f2b9271bcdff91 100644 (file)
@@ -39,7 +39,7 @@
     #include "wx/control.h"
 #endif
 
-#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && (!defined(_WIN32_WCE) || (_WIN32_WCE >= 400 && !defined(__POCKETPC__) && !defined(__SMARTPHONE__)))
+#if wxUSE_TOOLBAR && wxUSE_TOOLBAR_NATIVE && !defined(__SMARTPHONE__)
 
 #include "wx/toolbar.h"
 #include "wx/sysopt.h"
@@ -240,7 +240,7 @@ bool wxToolBar::Create(wxWindow *parent,
     wxSetCCUnicodeFormat(GetHwnd());
 
     // set up the colors and fonts
-    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR));
+    SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
     SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
 
     // workaround for flat toolbar on Windows XP classic style
@@ -963,8 +963,8 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
         LRESULT state = ::SendMessage(GetHwnd(), TB_GETSTATE, id, 0);
         toggled = (state & TBSTATE_CHECKED) != 0;
 
-        // ignore the event when a radio button is released, as this doesn't seem to
-        // happen at all, and is handled otherwise
+        // ignore the event when a radio button is released, as this doesn't
+        // seem to happen at all, and is handled otherwise
         if ( tool->GetKind() == wxITEM_RADIO && !toggled )
             return true;
 
@@ -979,7 +979,7 @@ bool wxToolBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
         // revert back
         tool->Toggle(!toggled);
 
-        ::SendMessage(GetHwnd(), TB_CHECKBUTTON, id, MAKELONG(toggled, 0));
+        ::SendMessage(GetHwnd(), TB_CHECKBUTTON, id, MAKELONG(!toggled, 0));
     }
 
     return true;
@@ -1012,6 +1012,8 @@ bool wxToolBar::MSWOnNotify(int WXUNUSED(idCtrl),
 
     return HandleTooltipNotify(code, lParam, tool->GetShortHelp());
 #else
+    wxUnusedVar(lParam);
+
     return false;
 #endif
 }