I am trying to capture messages sent from CWebBrowser2 Object.
m_WebBrowser.Create(_T(""), _T(""), WS_VISIBLE, rect, this, 1, NULL);
m_WebBrowser.Navigate(_T("www.test.com"), NULL, NULL, NULL, NULL);
m_WebBrowser.SetDlgCtrlID(1000);
My EVENTSINK_MAP looks like this :
BEGIN_EVENTSINK_MAP(CWebBrowserDlg, CDialog)
ON_EVENT(CWebBrowserDlg, 1000, DISPID_COMMANDSTATECHANGE,
CWebBrowserDlg::Test, VTS_NONE)
END_EVENTSINK_MAP()
And the fuction that must be called :
void CWebBrowserDlg::Test(long Command, BOOL Enable)
{
int j = 0; // so i can get a breakpoint
}
However i can never enter Test() when the browser navigates to a page, clicked by user.