Called by MSHTML when IOleInPlaceActiveObject::TranslateAccelerator or IOleControlSite::TranslateAccelerator is called.
Syntax
HRESULT TranslateAccelerator( LPMSG lpMsg, const GUID FAR *pguidCmdGroup, DWORD nCmdID );
Parameters
- lpMsg
- Address of the message to be translated.
- pguidCmdGroup
- Address of the command group identifier.
- nCmdID
- Unsigned long integer that specifies a command identifier.
Return Value
Returns S_OK if successful, or S_FALSE otherwise.
Remarks
When you use accelerator keys such as TAB, you may need to override the default host behavior. The example shows how to do this.
Windows CE
Windows CE Use version 2.12 and later Minimum availability Internet Explorer 4.0
Example
This example shows how to override the default host behavior that occurs when a user tabs out of the first or last element.
CYourControlSite::TranslateAccelerator(MSG *pMsg, DWORD dwFlags) { if( pMsg && pMsg->message == WM_KEYDOWN && pMsg->wParam == VK_TAB ) { return S_FALSE; } //return baseclassControlSite::TranslateAccelerator( pMsg, dwFlags); }