Solved

Removing Custom Context Menu (right click menu)

Posted on 2006-11-21
2
261 Views
Last Modified: 2013-11-20
Hi guys,

I've downloaded this:

http://www.codeproject.com/internet/CustomBrowser.asp

It's probably really simple, but I can't seem to do it...

How would I go about removing the custom context menu (right click menu), and going back to the standard Internet Explorer one?


Cheers guys 'n gals!
0
Comment
Question by:Cyber-Drugs
2 Comments
 
LVL 4

Accepted Solution

by:
bdunz19 earned 500 total points
ID: 17991126
Hi Cyber,

In your Custsite.cpp file locate the CCustomControlSite::XDocHostUIHandler::ShowContextMenu() function. In there you need to comment the following or remove it (you also need to return S_FALSE instead of return S_OK):

HRESULT FAR EXPORT  CCustomControlSite::XDocHostUIHandler::ShowContextMenu(
                        DWORD /*dwID*/,
                        POINT* pptPosition,
                        IUnknown* /*pCommandTarget*/,
                        IDispatch* /*pDispatchObjectHit*/)
{
      METHOD_PROLOGUE(CCustomControlSite, DocHostUIHandler)

// I commented the following and we will let explorer handle this
      //CMenu menu;
      //menu.LoadMenu(IDR_CUSTOM_POPUP);
      //CMenu* pSubMenu = menu.GetSubMenu(0);
      ////Because we passed in theApp.m_pMainWnd all of our
      ////WM_COMMAND handlers for the menu items must be handled
      ////in CCustomBrowserApp. If you want this to be your dialog
      ////you will have to grab a pointer to your dialog class and
      ////pass the hWnd of it into the last parameter in this call
      //pSubMenu->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON, pptPosition->x, pptPosition->y, theApp.m_pMainWnd);

// Return S_FALSE to show that we have not handled this ourselves
    return S_FALSE;
}
0
 
LVL 4

Author Comment

by:Cyber-Drugs
ID: 17995218
I spent ages looking for that, thanks bdunz19! :)
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 151
maven archtype selection in eclipse 1 57
Bartender label printing - switch on and off graphics 3 54
Authenticate using sesu from script 7 55
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question