Solved

Removing Custom Context Menu (right click menu)

Posted on 2006-11-21
2
259 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
repeatEnd java challenge 42 84
Window placement 17 77
MaxSpan challenge 9 82
Annoying "thing" blocks my view 4 83
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

863 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now