Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I am writing a class in C++ that provides HTML editor functionality. It is derived from CHtmlEditCtrl. Well actually it is based on this excellent article DHTML Editor with Table Support and Source Editor[^].

My problem is that the ActiveX control provided by Microsoft does not appear to be completely written. For example the command IDM_PROPERTIES should display a properties dialog. It does not. It just returns with success. Likewise IDM_REPLACE just displays a blank dialog.

Now I have no problem in extending the functionality to add these missing features. My problem is that the ActiveX control implements a right hand function that displays a context menu, which just happens to include a "Properties" entry. This, as you can guess, does absolutely nothing.

How can I change the behaviour of this ActiveX so that either it does not present this menu option, or so that it calls my implementation?
Posted
Comments
max_nowak 11-Sep-13 4:58am    
Maybe you should address this question directly to the writer of that article you took as role model
Anorexic Tribble 12-Sep-13 3:22am    
Maybe I have !!! The problem is not specific to the author's article. It is a problem with the ActiveX control itself. Hence the question was targeted at a wider audience.
max_nowak 12-Sep-13 7:38am    
Well, what I know is that there's a COM-interface called IDocHostUIHandler, whith whom you can change the behaviour of the browser control's context menu. But since I have no inside in your project I can't really say if your class structure allows you to implement this interface (probably one of your wrapper classes already does). Maybe this is helpful: http://www.codeproject.com/Articles/4758/How-to-customize-the-context-menus-of-a-WebBrowser
Anorexic Tribble 13-Sep-13 10:07am    
Brilliant, that was exactly what I needed. Easy to find when you know the name of it!!
max_nowak 14-Sep-13 17:14pm    
No problem, glad I could help;)

1 solution

See comments under the question.
 
Share this answer
 

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