]> git.saurik.com Git - wxWidgets.git/commitdiff
Override MSWTranslateMessage for wxActiveXContainer. Calling IOleInPlaceActiveObject...
authorSteve Lamerton <steve.lamerton@gmail.com>
Mon, 28 Nov 2011 20:19:16 +0000 (20:19 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Mon, 28 Nov 2011 20:19:16 +0000 (20:19 +0000)
Fixes #13679.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/ole/activex.h
src/msw/ole/activex.cpp

index b86b5e156c675502be99a7a8cbf887d73dea4ec7..f07c262c0516fef81df21749995ceb1c89731880 100644 (file)
@@ -168,6 +168,7 @@ public:
     void OnPaint(wxPaintEvent&);
     void OnSetFocus(wxFocusEvent&);
     void OnKillFocus(wxFocusEvent&);
+    virtual bool MSWTranslateMessage(WXMSG* pMsg);
 
 protected:
     friend class FrameSite;
index dec49a768c58b06f0226b14e3c4f8c3084b87b17..d161e6d4a61f8ab213ca4e6bc5750c3faadc606a 100644 (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