Fix for toolbar commands not working
authorJulian Smart <julian@anthemion.co.uk>
Sat, 27 Jun 2009 12:31:12 +0000 (12:31 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Sat, 27 Jun 2009 12:31:12 +0000 (12:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/frame.cpp

index 33b6df22bb8275b70ab22190dc38097e90120875..f81b58b4f2ef4cf66559a7224265fd26a154414f 100644 (file)
@@ -893,6 +893,12 @@ bool wxFrame::HandleSize(int WXUNUSED(x), int WXUNUSED(y), WXUINT id)
 bool wxFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
 {
 #if wxUSE_MENUS
+
+#if defined(WINCE_WITHOUT_COMMANDBAR)
+    if (GetToolBar() && GetToolBar()->FindById(id))
+        return GetToolBar()->MSWCommand(cmd, id);
+#endif
+
     // we only need to handle the menu and accelerator commands from the items
     // of our menu bar, base wxWindow class already handles the rest
     if ( !control && (cmd == 0 /* menu */ || cmd == 1 /* accel */) )