Click here to Skip to main content
15,880,608 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello
I'm currently working on rather old code using MFC (but the web browser is still used for Windows Forms and C#)

So my application uses 2 UI dialog boxes containing WebBrowser controls to show XML files... It works well, the Webbrowser control adds syntax coloring and indentation, etc... so far so good.

But now for one of the WebBrowser, I want to catch the user interaction, especially when the user selects an element/node while displaying XML (the WebBrowser control allows to interactively fold/unfold the XML hierarchy with the '+' and '-' symbols displayed in front of the XML elements).
I'm convenient with gathering events such as OnBeforeNavigate2 or OnStatusBarChange, but I am not able to found any overridable method or event allowing me to know if an fold/unfold action (or click) was made (in a ideal way, I need also indication about the name of the element) ?
I find out that when clicking on the '+' and '-' symbols, the StatusBar text become file name with a hasmark added to it.

And a second (closely related) question : is there a method or event to catch the opening of context menu (right click in the web browser control) ?

Thanks in advance
Greetings from La Rochelle, France
Posted
Comments
chaau 7-Aug-14 19:10pm    
have a look at this question: http://www.codeproject.com/Questions/261535/vcplusplus-web-browser-control-catching-javascript It has some helpful answers

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900