Solved

Removing Custom Context Menu (right click menu)

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
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…
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.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

707 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