o
原本32位的程序改为编译为64位之后,编译出现了错误:
error C2440: “static_cast”: 无法从“void (__cdecl CMainWnd::* )(UINT)”转换为“void (__cdecl CWnd::* )(UINT_PTR)
原来,64位编译所使用的相关定义文件与32位的有所不同,在32位的环境下,OnTimer的定义为:
OnTimer(UINT nIDEvent)
而64位环境下的定义变成了:
OnTimer(UINT_PTR nIDEvent)
UINT:unsigned int
UINT_PTR:unsigned long long
因此关于定时器的代码需要重新定义。
(点击率:2624)