是否有一个标志来阻止CDHTMLDialog使用IE历史记录(后退,退格,上下文菜单)?或者有事件需要寻找? 我似乎没有在PreTranslateMessage()中跟踪它。
答案 0 :(得分:1)
查看这些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);
}