MFC-1:vc6.0转vs2005出现的问题

 在将vc6.0程序转换到vs2005或者vs2008、vs2010时提示:error C2440: 'static_cast' : cannot convert from 'UINT (__thiscall CStaticLink::* )(CPoint)' to 'LRESULT (__thiscall CWnd::* )(CPoint)
  解决方法:找到  UNIT CStaticLink::OnNcHitTest(CPoint point) 将UNIT 改为LRESULT 

error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
这是因为在VC6中,若是没有显示的指定返回值类型,编译器将其视为默认整型。然则vs2005不支撑默认整型。
解决办法如下:打开:项目----项目属性----设备属性----C/C++----号令行,在附加选项那边添加/wd4430这个选项。
 
 

posted @ 2014-11-18 16:32  初来  阅读(204)  评论(0编辑  收藏  举报