|
|
|
|
User Defined MessagesThere are times when the existing standard messages are not enough. Although it is common practice to define a user message at WM_USER plus some constant value, this can have rare problems with MFC. There are some controls that use messages that start with WM_USER and go up from there. The safest way to use user defined messages is to let Windows generate a guaranteed unique system message. UINT g_uiMsg = RegisterWindowMessage ( _T(“User Message”) ); Of course, defining a message is just part of the battle. Now you have to actually USE it. BEGIN_MESSAGE_MAP(CChildFrame,
CMDIChildWnd) And, of course, we have to declare the method to be used. In the class header: //{{AFX_MSG(CChildFrame) And the implementation: LRESULT CChildFrame::OnMsg () |
|
|