i trying implement custom menu internet explorer 7.0. have use idochostuihandler::showcontextmenu only. till able implement basic context menu 2 options. problem disabled default. sample code same is: hresult cwebeventhandler::showcontextmenu(dword dwid,point *ppt, iunknown *pcmdtarget, idispatch *pdispobject) { if (false) // put guard code here. of not consider return s_false; // show standard context menus. else { iolewindow* pwnd = null; hresult hr = pcmdtarget->queryinterface(iid_iolewindow, (void**) &pwnd); if (succeeded(hr)) { hwnd hwnd; if (succeeded(pwnd->getwindow(&hwnd))) { hmenu menu = ::createpopupmenu(); ::appendmenu(menu, mf_string, id_hello, l"&hello" ); // id_hello & id_world 2 menu resource items ::appendmenu(menu, mf_string, id_world, l"&world" ); ...
Comments
Post a Comment