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.

[This is the backport of r76676 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-10-03 01:51:59 +00:00
parent 2e91798e96
commit 1f2a74014f
3 changed files with 48 additions and 9 deletions

View File

@@ -133,6 +133,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;
#if wxUSE_OWNER_DRAWN
// item bitmaps