]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/wince/tbarwce.cpp
make sure we don't use uninitalized output stream in OnSysWrite() (coverity checked...
[wxWidgets.git] / src / msw / wince / tbarwce.cpp
index 4d5f0e3f494e35651057d417141ee046b2033fc9..cc3aa112d2a565438a39ad1f047176f251a7888f 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);