Override MSWTranslateMessage for wxActiveXContainer. Calling IOleInPlaceActiveObject::TranslateAccelerator ensures that accelerators and other keyboard functionality behaves correctly.

Fixes #13679.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton
2011-11-28 20:19:16 +00:00
parent 6c5cc8a075
commit 8a4e043aef
2 changed files with 17 additions and 0 deletions

View File

@@ -1260,4 +1260,20 @@ void wxActiveXContainer::OnKillFocus(wxFocusEvent& event)
event.Skip();
}
//---------------------------------------------------------------------------
// wxActiveXContainer::MSWTranslateMessage
//
// Called for every message that needs to be translated.
// Some controls might need more keyboard keys to process (CTRL-C, CTRL-A ect),
// In that case TranslateAccelerator should always be called first.
//---------------------------------------------------------------------------
bool wxActiveXContainer::MSWTranslateMessage(WXMSG* pMsg)
{
if(m_oleInPlaceActiveObject.IsOk() && m_oleInPlaceActiveObject->TranslateAccelerator(pMsg) == S_OK)
{
return true;
}
return wxWindow::MSWTranslateMessage(pMsg);
}
#endif // wxUSE_ACTIVEX