Archive for August 21st, 2008
- In: MFC
- Leave a Comment
Just override the CHtmlView::OnShowContextMenu funcion and return S_OK.
HRESULT CWebBrowserView::OnShowContextMenu(DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved) { CMenu menu; int pMenuID = 0; VERIFY(menu.LoadMenu(IDR_WEBBROWSER)); CMenu* pPopup = menu.GetSubMenu(pMenuID); ASSERT(pPopup != NULL); pPopup->TrackPopupMenu(TPM_LEFTALIGN |TPM_RIGHTBUTTON, ppt->x, ppt->y, this); return S_OK; // Don’t call the base version //return CHtmlView::OnShowContextMenu(DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved); }
- In: MFC
- Leave a Comment
Just override the CHtmlView::OnShowContextMenu funcion and return S_OK.
HRESULT CWebBrowserView::OnShowContextMenu(DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved) { return S_OK; // Don’t call the base version //return CHtmlView::OnShowContextMenu(DWORD dwID, LPPOINT ppt, LPUNKNOWN pcmdtReserved, LPDISPATCH pdispReserved); }