Restore sending wxEVT_CONTEXT_MENU for wxTE_RICH controls in wxMSW

Since the changes to use IRichEditOleCallback in wxMSW wxTextCtrl (i.e.
bd650ec3d9 in master), wxEVT_CONTEXT_MENU was
not sent for it any more as the control consumed it after using the callback.

Send the event manually before the default handling takes place to fix this.
This commit is contained in:
Vadim Zeitlin
2015-09-23 03:04:35 +02:00
parent 56a6bc8006
commit 585b49474d
2 changed files with 23 additions and 1 deletions

View File

@@ -247,6 +247,9 @@ protected:
// the paragraph styles globally.
bool MSWSetParaFormat(const wxTextAttr& attr, long from, long to);
// Send wxEVT_CONTEXT_MENU event from here if the control doesn't do it on
// its own.
void OnRightUp(wxMouseEvent& event);
// we're using RICHEDIT (and not simple EDIT) control if this field is not
// 0, it also gives the version of the RICHEDIT control being used