?
Solved

Removing Custom Context Menu (right click menu)

Posted on 2006-11-21
2
Medium Priority
?
267 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
bdunz19 earned 2000 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

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

Question has a verified solution.

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

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…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses

770 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