我在Windows2000下使用VC++ 6.0编译《Windows核心编程》附送CD中的例子,出现下面的错误,请教如何解决??特别是“You are not using the latest Platform SDK header/library files. This may prevent the project from building correctly.”让我很迷茫!
在线等待!!--------------------Configuration: 01 ErrorShow - Win32 Debug--------------------
Compiling...
ErrorShow.cpp
You are not using the latest Platform SDK header/library 
files. This may prevent the project from building correctly.
d:\mxl\study\vc\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
d:\mxl\study\vc\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier
d:\mxl\study\vc\01-errorshow\errorshow.cpp(83) : error C2065: 'PCTSTR' : undeclared identifier
d:\mxl\study\vc\01-errorshow\errorshow.cpp(83) : error C2146: syntax error : missing ')' before identifier 'LocalLock'
d:\mxl\study\vc\01-errorshow\errorshow.cpp(83) : error C2059: syntax error : ')'
d:\mxl\study\vc\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.01 ErrorShow.exe - 6 error(s), 0 warning(s)

解决方案 »

  1.   

    可以修改这些代码来实现:
    1。去掉ptr
    2。去掉p
    3.改为LPCTSTR
    在第四个参数前加上(DLGPROC)
      

  2.   

    或者可以更新你的sdk,再或者也可以在vc.net下编译
      

  3.   

    每个例子都不能编译成功,
    我不知道VC++怎么发现“You are not using the latest Platform SDK header/library files. This may prevent the project from building correctly.”
    另外,怎样更新我的sdk?
      

  4.   

    不过是有些函数在老一点的sdk头文件中,并没有申明,不过代码中的例子的程序倒是比较好改的,我就没有更新sdk不过是做了上面的一些工作就把问题解决了,GetWindowLongPtr和
    GetWindowLong本身功能没有太大的区别,不过是为了兼容以后的64位程序用的而已,所以一般的情况下改改函数和参数就可以了