]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/wince/tbarwce.cpp
changed DoMessageFromThreadWait() to not block if there are no messages, this avoids...
[wxWidgets.git] / src / msw / wince / tbarwce.cpp
index 4d5f0e3f494e35651057d417141ee046b2033fc9..9d9cf88f7e3f9ba64a8ca3c273b04400b98fad51 100644 (file)
@@ -491,6 +491,15 @@ bool wxToolMenuBar::MSWCommand(WXUINT WXUNUSED(cmd), WXWORD id)
     wxToolBarToolBase *tool = FindById((int)id);
     if ( !tool )
     {
+        if (m_menuBar)
+        {
+            wxMenuItem *item = m_menuBar->FindItem(id);
+            if (item && item->IsCheckable())
+            {
+                item->Toggle();
+            }
+        }
+
         wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED);
         event.SetEventObject(this);
         event.SetId(id);
@@ -543,7 +552,7 @@ WXLRESULT wxToolMenuBar::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lP
             break;
     }
 
-    return wxControl::MSWWindowProc(nMsg, wParam, lParam);
+    return MSWDefWindowProc(nMsg, wParam, lParam);
 }