git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12282
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxWindowMSW::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
#if wxUSE_MENUS_NATIVE
bool wxWindowMSW::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
{
#if wxUSE_MENUS_NATIVE
- if ( wxCurrentPopupMenu )
+ if ( !cmd && wxCurrentPopupMenu )
{
wxMenu *popupMenu = wxCurrentPopupMenu;
wxCurrentPopupMenu = NULL;
{
wxMenu *popupMenu = wxCurrentPopupMenu;
wxCurrentPopupMenu = NULL;
}
#endif // wxUSE_MENUS_NATIVE
}
#endif // wxUSE_MENUS_NATIVE
- wxWindow *win = (wxWindow*) NULL;
if ( cmd == 0 || cmd == 1 ) // menu or accel - use id
{
// must cast to a signed type before comparing with other ids!
win = FindItem((signed short)id);
}
if ( cmd == 0 || cmd == 1 ) // menu or accel - use id
{
// must cast to a signed type before comparing with other ids!
win = FindItem((signed short)id);
}
{
// find it from HWND - this works even with the broken programs using
// the same ids for different controls
{
// find it from HWND - this works even with the broken programs using
// the same ids for different controls