WM

xiaoxiao2021-03-06  14

// send the string to the main dialog box copyDataStruct CDS = {0, LSTRLENA (BUF) 1, BUF}; hWnd hwndtarget = FindWindow (Null, "Last MessageBox Info"; if (hwndtarget) MessageBox (null, "no Find target window "," error ", MB_OK;

// WPARAM is this window handle SendMessage (HWndTarget, WM_CopyData, (WPARAM) NULL, (LPARAM) & CDS);

============================================================================================================================================================================================================= =

BOOL CMir2Dlg :: OnCopyData (CWnd * pWnd, COPYDATASTRUCT * pCopyDataStruct) {// TODO: Add your message handler code here and / or call default SetDlgItemText (IDC_INFO, (LPCTSTR) pCopyDataStruct-> lpData);

Return CDialog :: ONCOPYDATA (PWND, PcopyDataStruct);

转载请注明原文地址:https://www.9cbs.com/read-48498.html

New Post(0)