标签:
#define WM_USER_THREADEND WM_USER + 1
afx_msg LRESULT OnUserThreadend(WPARAM wParam, LPARAM lParam);
ON_MESSAGE(WM_USER_THREADEND, OnUserThreadend)
LRESULT ThreadDialog::OnUserThreadend(WPARAM wParam, LPARAM lParam) { TRACE("WM_USER_THREADEND message /n"); return 0; }
::PostMessage(GetSafeHwnd(), WM_USER_THREADEND, 0, 0);
其中GetSafeHwnd()得到了一个当前窗口的句柄,此消息将发给当前窗口,如果想发送消息给其它
窗口只需改变这个句柄,前提是目的窗口也实现了此消息的处理函数。
标签:
原文地址:http://www.cnblogs.com/loveyou999/p/4414258.html