如果是SendMessage发送的CString 

CString s = "xxxxxx";
SendMessage(hWnd,WM_XXXX,NULL,(LPARAM)&s);

消息处理函数:CString s = *((CString*)lParam);

如果使用PostMessage发送:
CString* ps = new CString("xxxxxx");
PostMessage(hWnd,WM_XXXX,NULL,(LPARAM)ps);

消息接收:
CString* ps = (CString*)lParam;
..... 消息处理
delete ps; // 清除CString, 不然会内存泄漏。

相关文章:

  • 2021-11-26
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-08-12
  • 2021-06-30
  • 2022-01-12
猜你喜欢
  • 2022-12-23
  • 2021-09-17
  • 2021-06-19
  • 2021-11-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案