ErrLook 6 句柄无效,意思是因为HWND窗口句柄不存在。但你用的是PostThreadMessage,用到的是thread identifier,不是句柄。
MSDN: returns ERROR_INVALID_THREAD_ID if idThread is not a valid thread identifier, or if the thread specified by idThread does not have a message queue.#define ERROR_INVALID_THREAD_ID 1444L
所以不知道LZ的ErrLook 6到底怎么来的。
MSDN: returns ERROR_INVALID_THREAD_ID if idThread is not a valid thread identifier, or if the thread specified by idThread does not have a message queue.#define ERROR_INVALID_THREAD_ID 1444L
所以不知道LZ的ErrLook 6到底怎么来的。
MSG msg;
PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
线程退出前通知主线程,停止发送消息消息处理完成退出。
创建的代码检测这个事件然后退出,这是可以开始 PostMessage