Custom messages cannot be defined in ATL as in MFC, because there is no concept of MSG map in standard ATL, and if you are doing ActiveX, you can msg to window,
ATL provides macros of the BEGIN_MESSAGE_MAP category:
First, define the message ID: #define WM_MYMSG wm_user+100//This step is the same as in MFC
To declare a message response function:
LRESULT OnMyMessage (UINT nmsg, WPARAM WPARAM, LPARAM LPARAM, bool& bhandled); This particular note, which is the biggest difference from MFC, requires four parameters.
Add into message queue to:
Message_handler (wm_mymsg, OnMyMessage)//This is also different from MFC, it uses MESSAGE_HANDLER macros, while MFC uses On_message
Finally define a function entity:
LRESULT cfileimportctrl::onmyfilefinish (UINT nmsg, WPARAM WPARAM, LPARAM LPARAM, bool& bhandled)//Note, LRESULT that identifies a value that needs to be returned.
{
return 0;
}
Send this message:
SendMessage (m_hwnd,wm_mymsg,0,0);
OK, as to what needs to implement what function you added, wparam and lparam Here I have to take as 0, if you need to pass parameters, then through this even a row parameter added;