ClassWizard does not allow increasing user-defined messages, so you must be manually entered. After entering, ClassWizard can handle your custom message like processing other messages. Below is the step of adding a custom message: The first step: Define the message. When developing a Windows95 application, Microsoft recommends that user-defined messages are at least WM_USER 100 because many new controls should also use WM_USER messages. Step 2: Implement the message processing function. This function uses WPRAM and LPARAM parameters and returns lpeSult. LPESULT CMAINFRAME :: OnMyMessage (WPARAM WPARAM, LPARAM LPARAM) {// Todo: Handling User Custom Messages ... Return 0;} Step 3: Description Message Processing Functions in the AFX_MSG block of the class header: Class CMAINFRAME: PUBLIC Usually CMDIFrameWnd {... // message mapping function protected: // {{aFX_MSG (CMainFrame) afx_msg int OnCreate (lPCREATESTRUCT lpCreateStruct); afx_msg void OnTimer (UINT nIDEvent); afx_msg LRESULT OnMyMessage (WPARAM wParam, LPARAM lParam); // }} AFX_MSGDECLARE_MESSAGE_MAP ()} Step 4: In the user class message block, use the ON_MESSAGE macro to map the message to the message processing function. BEGIN_MESSAGE_MAP (CMainFrame, CMDIFrameWnd) // {{AFX_MSG_MAP (CMainFrame) ON_WM_CREATE () ON_WM_TIMER () ON_MESSAGE (WM_MY_MESSAGE, OnMyMessage) //}} AFX_MSG_MAPEND_MESSAGE_MAP () if the user requires a unique message throughout the system, it can be called and used SDK function RegisterWindowMessage The ON_REGISTER_MESSAGE macro replaces the ON_MESSAGE macro, the rest of the steps.