CDHtmlDialog中禁用右键菜单和F5刷新2010-07-22programming tools约 101 字 预计阅读 1 分钟文章目录【注意】最后更新于 July 22, 2010,文中内容可能已过时,请谨慎使用。参考:猛击这里 在头文件中加入:1 2 STDMETHOD(ShowContextMenu)(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved); STDMETHOD(TranslateAccelerator)(LPMSG lpMsg, const GUID * pguidCmdGroup, DWORD nCmdID); 在cpp中加入: 1 2 3 4 5 6 7 8 9 10 11 12 13 STDMETHODIMP ChtmldialogDlg::ShowContextMenu(DWORD dwID, POINT *ppt, IUnknown *pcmdtReserved, IDispatch *pdispReserved) { //return CDHtmlDialog::ShowContextMenu(dwID, ppt, pcmdtReserved, pdispReserved); return S_OK; } STDMETHODIMP ChtmldialogDlg::TranslateAccelerator(LPMSG lpMsg, const GUID * pguidCmdGroup, DWORD nCmdID) { if (lpMsg && lpMsg->message == WM_KEYDOWN && lpMsg->wParam == VK_F5) { return S_OK; } return CDHtmlDialog::TranslateAccelerator(lpMsg, pguidCmdGroup, nCmdID); } 文章作者 Chen, Zai-Chun上次更新 2010-07-22许可协议 CC BY-NC-ND 4.0