i'm using mfc. what is the message sent by the window when the close button in clicked. in the regular win api it's WM_CLOSE, but it's apparently differently in mfc. i tried including
You always have the ability to override this method, but to that you need to override it in the class definition. Here's an example from my emulator:
NeoMain.h:
Code:
class NeoMain : public CFrameWnd
{
public:
NeoMain();
protected:
int OnCreate(LPCREATESTRUCT lpCreateStruct);
void OnClose();
std::string m_strVersion; ///< String dictating the current NeoPSX verison.
DECLARE_MESSAGE_MAP();
};
You're doing it wrong afaik
ON_WM_CLOSE() is the one you're looking for. MFC simply wraps windows API, it doesn't change it. WM_CLOSE is sent to your window, it is.
You can also use spy++ to monitor sent messages to your windows.
You're doing it wrong afaik
ON_WM_CLOSE() is the one you're looking for. MFC simply wraps windows API, it doesn't change it. WM_CLOSE is sent to your window, it is.
You can also use spy++ to monitor sent messages to your windows.