unsafe HRESULT IOleControlSite.TranslateAccelerator(User32.MSG* pMsg, KEYMODIFIERS grfModifiers) { if (pMsg is null) { return HRESULT.E_POINTER; } Debug.Assert(!_host.GetAxState(s_siteProcessedInputKey), "Re-entering IOleControlSite.TranslateAccelerator!!!"); _host.SetAxState(s_siteProcessedInputKey, true); Message msg = *pMsg; try { bool f = _host.PreProcessMessage(ref msg); return f ? HRESULT.S_OK : HRESULT.S_FALSE; } finally { _host.SetAxState(s_siteProcessedInputKey, false); } }
unsafe HRESULT Ole32.IOleControlSite.TranslateAccelerator(User32.MSG *pMsg, Ole32.KEYMODIFIERS grfModifiers) { if (pMsg == null) { return(HRESULT.E_POINTER); } Debug.Assert(!Host.GetAXHostState(WebBrowserHelper.siteProcessedInputKey), "Re-entering Ole32.IOleControlSite.TranslateAccelerator!!!"); Host.SetAXHostState(WebBrowserHelper.siteProcessedInputKey, true); Message msg = *pMsg; try { bool f = ((Control)Host).PreProcessControlMessage(ref msg) == PreProcessControlState.MessageProcessed; return(f ? HRESULT.S_OK : HRESULT.S_FALSE); } finally { Host.SetAXHostState(WebBrowserHelper.siteProcessedInputKey, false); } }
unsafe HRESULT IDocHostUIHandler.TranslateAccelerator(User32.MSG *lpMsg, Guid *pguidCmdGroup, uint nCmdID) { if (lpMsg is null || pguidCmdGroup is null) { return(HRESULT.E_POINTER); } // Returning S_FALSE will allow the native control to do default processing, // i.e., execute the shortcut key. Returning S_OK will cancel the shortcut key. WebBrowser wb = (WebBrowser)Host; if (!wb.WebBrowserShortcutsEnabled) { int keyCode = (int)lpMsg->wParam | (int)Control.ModifierKeys; if (lpMsg->message != User32.WM.CHAR && Enum.IsDefined(typeof(Shortcut), (Shortcut)keyCode)) { return(HRESULT.S_OK); } } return(HRESULT.S_FALSE); }
unsafe HRESULT Ole32.IOleInPlaceFrame.TranslateAccelerator(User32.MSG *lpmsg, ushort wID) { return(HRESULT.S_FALSE); }
unsafe HRESULT IOleObject.DoVerb(OLEIVERB iVerb, User32.MSG *lpmsg, IOleClientSite pActiveSite, int lindex, IntPtr hwndParent, RECT *lprcPosRect) { return(HRESULT.S_OK); }