★★★一、windows核心编程中的一个简单问题!★★★

hufanxp 2004-03-15 09:22:06
我编译ErrorShow项目时候,出现这样的错误?为什么(win2000+vc6+sp5)
该怎么处理?
You are not using the latest Platform SDK header/library
files. This may prevent the project from building correctly.
c:\program files\programming applications\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
c:\program files\programming applications\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
c:\program files\programming applications\01-errorshow\errorshow.cpp(83) : error C2065: 'PCTSTR' : undeclared identifier
c:\program files\programming applications\01-errorshow\errorshow.cpp(83) : error C2146: syntax error : missing ')' before identifier 'LocalLock'
c:\program files\programming applications\01-errorshow\errorshow.cpp(83) : error C2059: syntax error : ')'
c:\program files\programming applications\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,u
nsigned int,long)'
...全文
54 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
red-fly 2004-03-17
  • 打赏
  • 举报
回复
C:\Program Files\Programming Applications\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,u
nsigned int,long)'
?????????????????????????????????????????????????????????????????????
Your DialogBox function's param has some problems and you should read msdn carefully to find how to send the params. You shouldn't cry loudly here with no thinking.
msdn is very important, please read more times.
Pipi0714 2004-03-15
  • 打赏
  • 举报
回复
在vc的环境中把安装SDK的头文件以及lib文件设置即可。点击Tools菜单下的Options子才单出现对话框在Directories选项中设置。
hufanxp 2004-03-15
  • 打赏
  • 举报
回复
我没有修改源代码!

SDK已经更新好了!

nobounded 2004-03-15
  • 打赏
  • 举报
回复
你用VC7编译一下(如果你没有修改源代码的话),如果可以基本可以断定是SDK版本的问题。
最好贴出你出问题的这段源码。
快乐鹦鹉 2004-03-15
  • 打赏
  • 举报
回复
(__stdcall *),两个类型不一致。是不是动态调用动态库啊?
hufanxp 2004-03-15
  • 打赏
  • 举报
回复
咋解决呢,3ks!
hufanxp 2004-03-15
  • 打赏
  • 举报
回复
以上都好了,可还是有这个问题?
C:\Program Files\Programming Applications\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,u
nsigned int,long)'
nonocast 2004-03-15
  • 打赏
  • 举报
回复
设置路径啊
添加LIB/INCLUDE
hufanxp 2004-03-15
  • 打赏
  • 举报
回复
我下灾了最新,怎么还不行呀!
VCSQLVB 2004-03-15
  • 打赏
  • 举报
回复
就是,SDK有问题,重装。
subtop 2004-03-15
  • 打赏
  • 举报
回复
更新您的sdk
byyyyy 2004-03-15
  • 打赏
  • 举报
回复
集成环境的的问题
快乐鹦鹉 2004-03-15
  • 打赏
  • 举报
回复
同意。你的SDK有问题。版本不对啊。
red-fly 2004-03-15
  • 打赏
  • 举报
回复
pleae install SDK9
ahao 2004-03-15
  • 打赏
  • 举报
回复
把sdk的包含路径移动到vc的包含路径上面,然后rebuild all

16,473

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧