I have a BHO written as an MFC DLL that intercepts IE events (NavigateComplete etc). I also want to be able to open a window from the DLL. The first part (implementing SetSite and Invoke) works great.

I was able to subclass off CWnd and use CreateEx to make a window, but to get it to update the view, I need access to IE's main message pump. If this were an application and not a DLL, I could just use the Run() method to catch messages. According to MSDN,

Regular DLLs must have a CWinApp-derived class and a single object of that application class, as does an MFC application. However, the CWinApp object of the DLL does not have a main message pump, as does the CWinApp object of an application.

Note that the CWinApp::Run mechanism does not apply to a DLL, because the application owns the main message pump. If your DLL brings up modeless dialogs or has a main frame window of its own, your application's main message pump must call a DLL-exported routine that calls CWinApp::PreTranslateMessage.

Is there any way to get messages from IE and process them in PreCreateMessage


Note: this is different from declaring a message map in my CWnd/CFrameWnd class.

Re: Internet Explorer Extension Development Accessing IE's main message pump


Hi k6386,

Have you found a solution