小弟在学SDK编程,写了一个生成窗口的程序,一切正常,然后我在处理WM_PAINT消息的时候加了一个GetWindowInfo(hWnd,&wi);hWnd是句柄,wi是WINDOWINFO的结构体,编译就是错,说,GetWindowInfo,WINDOWINFO,wi没有定义
我和同学都检查过,没有语法问题,编译器是VC,只包含window.h
请大家帮忙,我头都大了,救命啊!!!!!!!!
各位高手求你们了,帮帮小弟吧!小弟穷,上一次网不容易啊!

解决方案 »

  1.   

    你的include 的路径对不对?
      

  2.   

    哪里看到的这个函数,好像不是个window API!
      

  3.   

    GetWindowInfo
    The GetWindowInfo function retrieves information about the specified window.BOOL GetWindowInfo(
      HWND hwnd,       // handle to window
      PWINDOWINFO pwi  // window information
    );
    Parameters
    hwnd 
    [in] Handle to the window whose information is to be retrieved. 
    pwi 
    [out] Pointer to a WINDOWINFO structure to receive the information. 
    Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. Windows NT/2000: To get extended error information, call GetLastError. Requirements 
      Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
      Windows 95/98: Requires Windows 98 or later.
      Header: Declared in Winuser.h; include Windows.h.
      Library: Use User32.lib.
      

  4.   

    Header: Declared in Winuser.h; include Windows.h.
    是Winuser.h没看到吗
      

  5.   

    是包含windows.h,用#include <windows.h>看看,不要用#include "windows.h"
      

  6.   

    to  awanghero(念天地之悠悠,独怆然而悌下!) :
    winuser.h 不是包含在windows.h中嘛,
    应该是不用重复include了:)
      

  7.   

    请问PWINDOWINFO这个结构体是在哪定义的?
    我查找所有的*.h文件都找不到.
    msdn上如是说:
    Header Declared in Winuser.h, include Windows.h 
      

  8.   

    用WINME的“搜索”找遍VC++5、BC502、DEV-C++的目录,
    都找不到pwindowinfo这个结构体。