随书光盘的源码,总是出现下面两行错误,不知为什么?d:\windows编程\windows核心编程\cmnhdr.h(212) : error C2065: 'GetWindowLongPtr' : undeclared identifier
d:\windows编程\windows核心编程\cmnhdr.h(212) : error C2065: 'GWLP_HINSTANCE' : undeclared identifier事实上GetWindowLongPtr和GWLP_HINSTANCE都是windows定义过的啊!

解决方案 »

  1.   

    这个问题肯定是编译时没有找到相应的头文件,你需要#include一下。如果编译器说找不着头文件的话,在工程设置里面自己添一下路径.
      

  2.   

    改为: GetWindowLong(hwnd, GWL_HINSTANCE) 可用
    另,有可能DialogBoxParam编译通不过,将错误信息中的类型拷贝上去就可
    I don't known why!
      

  3.   

    You are not using the latest Platform SDK header/library 
    files.
      

  4.   

    You are not using the latest Platform SDK header/library files. 
    我遇到的是这个问题。怎么解决?
    解决方案如下:
    自己改程序,改到能够通过为止。
    把原理看懂,自己编。