Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Handling Events with Webbrowser2 Control

Handling Events with Webbrowser2 Control

Scheduled Pinned Locked Moved C / C++ / MFC
questionhtmldata-structureshelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    John Clump
    wrote on last edited by
    #1

    Hi everyone. I have a webbrowser2 control on a dialog, with which I am using it to show an html document (a report) my program creates. I want to stop the control from displaying the properties menu when the user right clicks on it. I found a question someone asked previously about doing this, but I am still not quite sure how to do this. What should I override to do this, and how? Also, I am using a control bar toolbar of my own on the dialog, and I want to activate the button when the user highlights text, and deactive the button when there is no highlighted text (so the user can copy the text to the clipboard, of course they could hit ctrl-c to copy, but I want to give the user a queue that they can copy off the report to the clipboard). Is there an OnHighlightText type message that does not appear in ClassWizard? Thanks in advance for any help!

    A 1 Reply Last reply
    0
    • J John Clump

      Hi everyone. I have a webbrowser2 control on a dialog, with which I am using it to show an html document (a report) my program creates. I want to stop the control from displaying the properties menu when the user right clicks on it. I found a question someone asked previously about doing this, but I am still not quite sure how to do this. What should I override to do this, and how? Also, I am using a control bar toolbar of my own on the dialog, and I want to activate the button when the user highlights text, and deactive the button when there is no highlighted text (so the user can copy the text to the clipboard, of course they could hit ctrl-c to copy, but I want to give the user a queue that they can copy off the report to the clipboard). Is there an OnHighlightText type message that does not appear in ClassWizard? Thanks in advance for any help!

      A Offline
      A Offline
      alex barylski
      wrote on last edited by
      #2

      John Clump wrote: I want to stop the control from displaying the properties menu when the user right clicks on it. I found a question someone asked previously about doing this, but I am still not quite sure how to do this. What should I override to do this, and how? If all you want to do is disable the menu and not change it thats easy:) IDocHostUIHandler::ShowContextMenu and return S_OK HTH Laterz!!!;P "An expert is someone who has made all the mistakes in his or her field" - Niels Bohr

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups