Use IRichEditOleCallback for wxTextCtrl's context menu.

In wxMSW, use IRichEditOleCallback::GetContextMenu() to provide our
default context menu for rich text controls, instead of using
EVT_CONTEXT_MENU.

The latter completely overrides native control's handling and in
particular breaks Windows 8's builtin spellchecking support.

Fall back to the previous non-OLE code for older richtext versions.

Also make the new MSWCreateContextMenu() method virtual so that the
context menu can be customized.

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

View File

@@ -2335,6 +2335,8 @@ bool wxWindowMSW::HandleMenuPopup(wxEventType evtType, WXHMENU hMenu)
{
menu = wxCurrentPopupMenu;
isPopup = true;
if ( evtType == wxEVT_MENU_CLOSE )
wxCurrentPopupMenu = NULL;
}
else
{