CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    4

    RClick on CWebBrowser2

    I am hosting a webbrowser2 in my MFC based application. I'd like to customize the right click popup menu of IE.

    After checking the sample Driller, I implemented CustSite and return S_OK from CCustomControlSite::XDocHostUIHandler::ShowContextMenu.

    It does not display the IE menu.

    How do I obtain the handle to the associated WebBrowser object ?

    I need it to display and manage the popup menu.

    TIA.

    -Neeraj



  2. #2
    Join Date
    Jun 1999
    Location
    Vancouver, Canada
    Posts
    19

    Re: RClick on CWebBrowser2

    Did you ever figure this out? please let me know!


  3. #3
    Join Date
    May 1999
    Location
    nz
    Posts
    96

    Re: RClick on CWebBrowser2


  4. #4
    Join Date
    Apr 1999
    Posts
    4

    Re: RClick on CWebBrowser2

    All these articles are good, but they don't tell you everything. I wanted to insert the webbrowser object in a MFC DLL with minimal impact on the calling application.

    Finally, I used the DocHostUIHandler method.

    I derived a class from IDocHostUIHandler, made it a friend of my view class. Kept a pointer of my view class inside the derived class. Initialized it. When I right-click occurs, I call a function of the my view class.

    I hope this helps.

    I found that this technique works easily as compared to using CustSite way.


    Regards.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured