Introduction - If you have any usage issues, please Google them yourself
Usable Automation Shell for Internet Explorer
The below code has a few basic objectives:
To begin an instance of Internet Explorer automatically.
To detect the basic automation dispatch event messages that Internet Explorer sends to windows when it loads and exits.
To set up our automation program correctly, so that we can add any or all available Internet Explorer dispatch events using the MFC ClassWizard.
To notify us that the top Internet Explorer page has loaded, for multi-frame web pages that fire more than one DocumentComplete event.
To accomplish the surprisingly difficult task of being able to exit from Internet Explorer, or from the code, without leaving instances of either one running or crashing windows.