我用MFC給另外一個行程發送WM_SETTEXT訊息,如果使用SendMessage沒有問題,改成PostMessage對方就收不到這個訊息,這是為什么呢
uj5u.com熱心網友回復:
是不是 lParam 超出了作用域?用區域靜態變數或全域變數試試看
static CString szLocal;
szLocal = _T("XXXXX");
::PostMessage(hWnd, 0, (LPARAM)(LPCTSTR)szLocal);
uj5u.com熱心網友回復:
沒有用啊,只要用postmessage就不行
uj5u.com熱心網友回復:
Any message with range below WM_USER cannot be sent by the asynchronous message functions with a String parameter for crossing processes. (Note: PostMessage is asynchronous).uj5u.com熱心網友回復:
If the specified window was created by a different thread, the system switches to that thread and calls the appropriate window procedure.轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/132540.html
標籤:進程/線程/DLL
上一篇:影像的傅里葉變換
