在发送消息端使用例如以下方法:

 

SendMessage(WM_MESSAG_MINE,0,(LPARAM)strVal.AllocSysString());

----------------------------------------

在接收消息端使用:

BSTR b = (BSTR)lParam;
CString s(b);
SysFreeString(b);
AfxMessageBox(s);

相关文章: