From: Włodzimierz Skiba Date: Thu, 19 Jan 2006 22:03:03 +0000 (+0000) Subject: Checkable items in wxToolMenuBarTool supported. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c616c2e834192db06bbef18b9404824f563e335f Checkable items in wxToolMenuBarTool supported. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/docs/changes.txt b/docs/changes.txt index 3eb8bb1ed2..9242504877 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -127,8 +127,9 @@ wxWinCE: - ::wxGetUserName() implemented. - wxDisplay enumeration support. - Fixed wxFileDialog breakage on WinCE due to incorrect structure size. -- new wxSystemOption "wince.dialog.real-ok-cancel" to switch between WinCE +- New wxSystemOption "wince.dialog.real-ok-cancel" to switch between WinCE guidelines with Ok-only dialogs and dialogs using wxButtons. +- Checkable items in wxToolMenuBarTool supported. Unix: diff --git a/src/msw/wince/tbarwce.cpp b/src/msw/wince/tbarwce.cpp index 4d5f0e3f49..cc3aa112d2 100644 --- a/src/msw/wince/tbarwce.cpp +++ b/src/msw/wince/tbarwce.cpp @@ -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);