Add wxMenu::MSWDetachHMENU().

Make it possible to pass ownership of a wxMenu to win32.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2014-06-18 12:51:45 +00:00
parent 3821abef51
commit 2cf91e5c7c
2 changed files with 4 additions and 1 deletions

View File

@@ -352,7 +352,7 @@ wxMenu::~wxMenu()
// we should free Windows resources only if Windows doesn't do it for us
// which happens if we're attached to a menubar or a submenu of another
// menu
if ( !IsAttached() && !GetParent() )
if ( m_hMenu && !IsAttached() && !GetParent() )
{
if ( !::DestroyMenu(GetHmenu()) )
{