If you used the Visual Studio Wizard to insert the Web Browser control to the dialog resource you will be able to use the Wizard to process the events.
If you have created the control dynamically, you need to do the following:
1. In the h file of the parent dialog class add this macro:
DECLARE_EVENTSINK_MAP()
2. In the cpp file add this:
BEGIN_EVENTSINK_MAP(CTestProjectDlg, CDialog)
END_EVENTSINK_MAP()
Using these macros you will define the event sink for active X controls that will be placed in the dialog.
Now you need to declare the event handler in the h file, create its implementation in the cpp file, and map it using ON_EVEN macro.
For example, for NavigateComplete2 you would have these:
in the h file:
void NavigateComplete2Explorer1(LPDISPATCH pDisp, VARIANT* URL);
in the cpp file:
BEGIN_EVENTSINK_MAP(CTestProjectDlg, CDialog)
ON_EVENT(CTestProjectDlg, IDC_EXPLORER1, 252, CTestProjectDlg::NavigateComplete2Explorer1, VTS_DISPATCH VTS_PVARIANT)
END_EVENTSINK_MAP()
void CTestProjectDlg::NavigateComplete2Explorer1(LPDISPATCH pDisp, VARIANT* URL)
{
}