阿紫


分类

存档

热门文章

最新评论

最新留言

链接

公告

标签云

计数器
92636

搜索

error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)”
error C2440: “static_cast”: 无法从“UINT (__thiscall CSizingControlBar::* )(CPoint)”转换为“LRESULT (__thiscall CWnd::* )(CPoint)” f:\tools\4bands ifx_xmm2130_ft\common\sizecbar.cpp 109
CWnd类,afx_msg LRESULT OnNcHitTest(CPoint point);
而在CSizingControlBar中是afx_msg UINT OnNcHitTest(CPoint point);
只要将这些UINT替换为LRESULT就可以了。
查找OnNcHitTest,将下面两行:
afx_msg UINT OnNcHitTest(CPoint point);//.h
UINT CTestDlg::OnNcHitTest(CPoint point);//.cpp
改为:
afx_msg LRESULT OnNcHitTest(CPoint point);//.h
LRESULT CTestDlg::OnNcHitTest(CPoint point);//.cpp
另外一个小问题:
CString atMyCmd;
atMyCmd+=0x0d;
编译时出现“operator+=不明确”。改正方法:atMyCmd+=(char)0x0d;因为从unsigned int转换到CString和char的等级都是标准转换,所以编译器无法判断到底应该转换到哪一个,所以就导致了这个问题,所以应该强制转换。
2012年4月11日 21:14
流水帐啊~流水帐啊~
2012年4月11日 21:56
@李帅: 呃。。