64,654
社区成员
发帖
与我相关
我的任务
分享
::PostMessage(hWnd,WM_MYMESSAGE,NULL,(LPARAM)&m_info);
PostThreadMessage
The PostThreadMessage function places (posts) a message in the message queue of the specified thread and then returns without waiting for the thread to process the message.
简单说就是:异步执行消息,参数指针不能指向局部变量,因为局部变量销毁后,消息里的指针成了野指针。可以用指向堆内存。