Communicating with IE
-
I would like to learn how to do this using Visual C++/MFC: From my dialog-based program, send a message to an IE window and set the cursor(focus) on one object like the link "Visual C++" on this page. Or send a message to this already-executed IE to connect to a specific URL. How should I do that? Thanks a lot!
-
I would like to learn how to do this using Visual C++/MFC: From my dialog-based program, send a message to an IE window and set the cursor(focus) on one object like the link "Visual C++" on this page. Or send a message to this already-executed IE to connect to a specific URL. How should I do that? Thanks a lot!
Simply implement a "Browser helper object". There are examples in MSDN called IEHelper. You can control the IE (and also the windows explorer, active desktop) by invoking its methods (e.g. navigate, goback, goforward, ...) or asynchronously obtain the events from IE when the items on it are being clicked. Of course, you can access the DHTML model (e.g. any HTML elements on the page) and locate the cursor whenever you like. If you are familiar with javascript, that would be a big help in doing with dhtml too.