I got this class
class CWebBrowser2 : public CWnd
And i want to override OnClose What i have done so far is in the header file I added void OnClose(); and in the .cpp file i added
void CWebBrowser2::OnClose ()
{
int i=0;
i++;
}
But the OnClose is never called.
Then I tried to to modify the header file to
afx_msg void OnClose();
DECLARE_MESSAGE_MAP()
And added this to the .cpp file
BEGIN_MESSAGE_MAP(CWebBrowser2, CWnd)
//{{AFX_MSG_MAP(CBrowserDlg)
ON_WM_CLOSE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
But still OnClose is never called. I have tried to Change to OnClose to OnDestroy but that isnt called either.
any ideas on what Im doing wrong?