问题:有幸在某网站上下到了<windows核心编程>(Jeffrey Richter)配套光盘中的源代码,
在用VC6.0编译的时候总会出来如下错误提示:
Compiling...
ErrorShow.cpp
You are not using the latest Platform SDK header/library
files. This may prevent the project from building correctly.
e:\vc++_programming\01-errorshow\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
e:\vc++_programming\01-errorshow\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
e:\vc++_programming\01-errorshow\errorshow.cpp(125) : error C2664: 'DialogBoxParamA' : cannot convert parameter
4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Error executing cl.exe.ErrorShow.obj - 3 error(s), 0 warning(s)我觉得很奇怪,为什么说"You are not using the latest Platform SDK header/library "?
我可是用的vc6.0企业版呀,难道Platform SDK header/library还不够新吗?
在用VC6.0编译的时候总会出来如下错误提示:
Compiling...
ErrorShow.cpp
You are not using the latest Platform SDK header/library
files. This may prevent the project from building correctly.
e:\vc++_programming\01-errorshow\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
e:\vc++_programming\01-errorshow\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
e:\vc++_programming\01-errorshow\errorshow.cpp(125) : error C2664: 'DialogBoxParamA' : cannot convert parameter
4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'
None of the functions with this name in scope match the target type
Error executing cl.exe.ErrorShow.obj - 3 error(s), 0 warning(s)我觉得很奇怪,为什么说"You are not using the latest Platform SDK header/library "?
我可是用的vc6.0企业版呀,难道Platform SDK header/library还不够新吗?
解决方案 »
- 单文档多视图,视图固定问题。
- DLL导出派生类的疑问?
- CSerialPort类实现的串口通信关于LONG CMainFrame::OnComm(WPARAM ch,LPARAM port)处理问题
- 关于SDI如何刷新视图背景
- 向高手送分了!!
- 如何 判断 探测到的网卡是否为 无线网卡??
- 拥有怎么的水平才能找到工作
- 想学VC,大家觉得怎么样?
- 如何在CRichEditCtrl中的当前光标位置添加指定的文本?
- 请教-MSXML4.0 sax解析XML文档的时候 如果去含有“nbsp;”的节点数据
- 我用ODBC方式增加一条记录时,提示记录是只读,是什么回事啊
- 帮忙看看下面这段DAO连接数据库代码,总是报错“FROM 子句语法错误”? 谢谢了!
可能不是因为这原因!
最新的platform sdk可以到ms下载
记得要配置哦
而且要放在 include 第一项!
4 from 'long (struct HWND__ *,unsigned int,unsigned int,long)' to 'int (__stdcall *)(struct HWND__ *,unsigned int,unsigned int,long)'这个问题只要查找一下那个文件 125 行传递给 DialogBoxParam 或 DialogBox 的对话框过程的原型就可以了。
因为在其它的sdk,比如说DirectX SDK,Netmeeting SDK也应该有新的windows.h,及相应的库文件。所以这个办法也行得通(我就是这么做的)