From: http://www.cppblog.com/wlwlxj/archive/2008/09/12/10343.html? Opt = Admin
Nowadays, users pay more and more attention to the appearance of software, and applicationsProgramIt provides developers with strong control and is relatively weak in appearance. The development of multimedia satisfies people's visual perception, so they naturally think of the combination of applications and multimedia.
Functions:
1. Implement your right-click menu
2. webpage calls local commands through JavaScript
3. Call JavaScript locally to implement webpage operations
It can be done through htmlview in vc2003, which is relatively simple. It provides a createcontrolsite virtual function, which can be implemented with heavy load.
In fact, the idea of vc6 is similar, that is, colecontrolsite is not made public in vc6, which is difficult to implement. Here, the webbrowser control is used to change the control container created by it to obtain custom automatic interfaces.
Figure:
Webbrowser creation process: cwebbrowser2 object-> Create a window on the specified control container-> obtain the idispatch interface for webpage interaction.
Example:
Due to the recent tight schedule and few explanations, put them directlyCodeIf you have any questions, email me.