Handling Events with Webbrowser2 Control
-
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!
-
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!
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