Change to wxWindow::HandleCommand to allow accelerators to work even if there

is no corresponding child window.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2000-01-18 14:22:10 +00:00
parent ff0ea71cea
commit a84fc80be3

View File

@ -2997,6 +2997,17 @@ bool wxWindow::HandleCommand(WXWORD id, WXWORD cmd, WXHWND control)
if ( win )
return win->MSWCommand(cmd, id);
else
{
// If no child window, it may be an accelerator, e.g. for
// a popup menu command.
wxCommandEvent event(wxEVT_COMMAND_MENU_SELECTED);
event.SetEventObject(this);
event.SetId(id);
event.SetInt(id);
return ProcessEvent(event);
}
return FALSE;
}