From c616c2e834192db06bbef18b9404824f563e335f Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Thu, 19 Jan 2006 22:03:03 +0000 Subject: [PATCH] Checkable items in wxToolMenuBarTool supported. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 3 ++- src/msw/wince/tbarwce.cpp | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) 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); -- 2.45.2