Allow overriding wxMenu::MSWCommand() in wxMSW

This can be useful to implement custom handling of WM_COMMAND for the
popup menus, so make this function virtual and document it to indicate
that it is now part of the public API.

Closes https://github.com/wxWidgets/wxWidgets/pull/2170
This commit is contained in:
Gary Allen
2021-01-17 15:07:28 +02:00
committed by Vadim Zeitlin
parent a571ec6fbb
commit f4172b0b46
2 changed files with 30 additions and 2 deletions

View File

@@ -55,11 +55,12 @@ public:
// Don't use this object after calling this method.
WXHMENU MSWDetachHMENU() { WXHMENU m = m_hMenu; m_hMenu = NULL; return m; }
// Process WM_COMMAND.
virtual bool MSWCommand(WXUINT param, WXWORD id);
// implementation only from now on
// -------------------------------
bool MSWCommand(WXUINT param, WXWORD id);
// get the native menu handle
WXHMENU GetHMenu() const { return m_hMenu; }