// 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);