Проверьте эти ссылки MSDN и пример кода:
TranslateAccelerator и
ShowContextMenu
STDMETHODIMP CDHtmlDialogSubclass::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved)
{
return S_OK;
}
STDMETHODIMP CDHtmlDialogSubclass::TranslateAccelerator(LPMSG lpMsg, const GUID * pguidCmdGroup, DWORD nCmdID)
{
if (lpMsg && lpMsg->message == WM_KEYDOWN &&
(lpMsg->wParam == VK_F5 ||
lpMsg->wParam == VK_CONTROL))
{
return S_OK;
}
return CDHtmlDialog::TranslateAccelerator(lpMsg, pguidCmdGroup, nCmdID);
}