Fix changing the label of a submenu in wxMSW.

Use position, not the ID, to find the native menu items to allow the code in
wxMenuItem::SetItemLabel() and DoSetBitmap() to also work with submenus and
not just the normal items.

Closes #16246.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-06-09 20:33:17 +00:00
parent af692f090b
commit b6469b4369
3 changed files with 55 additions and 23 deletions

View File

@@ -127,6 +127,11 @@ private:
// common part of all ctors
void Init();
// Return the item position in the menu containing it.
//
// Returns -1 if the item is not attached to a menu or if we can't find its
// position (which is not really supposed to ever happen).
int MSGetMenuItemPos() const;
// item bitmaps
wxBitmap m_bmpChecked, // bitmap to put near the item