const UINT MYWM_THISMSG = ::RegisterWindowMessage(_T("MYWN_MSG110")); ON_REGISTERED_MESSAGE(MYWM_THISMSG,OnMyProcess)但是::SendMessage(HWND_BROADCAST,MYWM_THISMSG,101,0);没反映,收不到::SendMessage(pMyServer->m_hWnd,MYWM_THISMSG,(int)101,0);就可以Why?
调试欢乐多
HWND hWnd, // handle of destination window
UINT Msg, // message to send
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
Parameters
hWnd
Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
注意:but the message is not sent to child windows.
不会发送到一个子窗口里去.