0
点赞
收藏
分享

微信扫一扫

error C2664: “CSerialPort::InitPort”: 不能将参数 1 从“CCom_TestDlg *const ”转换为“HWND”

8052cf60ff5c 2022-12-23 阅读 64


将:

if(m_sp.InitPort(this,port,115200,'N',8,1)){

改为:

if(m_sp.InitPort(this->GetSafeHwnd(),port,115200,'N',8,1)){

...






改为:


if(m_sp.InitPort((HWND)this,port,115200,'N',8,1)){

不行,sendmessage发送接收消息将发送不到本窗口消息内。

举报

相关推荐

0 条评论