bitmapbrother
Programmer
Hi, I derived class from CWnd. I need to catch OnClose event but it doesnt work. Thx for any tips.
class MyWin : public CWnd
{
protected:
afx_msg void OnClose(void);
public:
MyWin();
~MyWin(void);
bool Init(void); // creates window by CWnd::CreateEx with parent = NULL
void Show(void); // shows window by CWnd::ShowWindow
};
// this is never called after i click [X] icon in windows title
afx_msg void MyWin::OnClose(void)
{
Msg(_T("OnClose")); // Msg is customized MessageBox
CWnd::OnClose();
}
class MyWin : public CWnd
{
protected:
afx_msg void OnClose(void);
public:
MyWin();
~MyWin(void);
bool Init(void); // creates window by CWnd::CreateEx with parent = NULL
void Show(void); // shows window by CWnd::ShowWindow
};
// this is never called after i click [X] icon in windows title
afx_msg void MyWin::OnClose(void)
{
Msg(_T("OnClose")); // Msg is customized MessageBox
CWnd::OnClose();
}