That API doesnt appear in the docs that come with VC++6....but it does appear in the SDK from last November......
Your best bet is to download the new SDK....but if you really cant wait all the time needed to download it.......try include the bold code I have put in the following example at the top of your code;
Code:
#include <windows.h>
typedef struct tagWINDOWINFO {
DWORD cbSize;
RECT rcWindow;
RECT rcClient;
DWORD dwStyle;
DWORD dwExStyle;
DWORD dwWindowStatus;
UINT cxWindowBorders;
UINT cyWindowBorders;
ATOM atomWindowType;
WORD wCreatorVersion;
} WINDOWINFO, *PWINDOWINFO, *LPWINDOWINFO;
typedef BOOL (WINAPI *GETWINDOWINFO)(
HWND hwnd,
PWINDOWINFO pwi
);
BOOL GetWindowInfo(HWND hwnd,PWINDOWINFO pwi){
HMODULE hMod;
hMod = LoadLibrary("User32.dll");
if(!hMod)return FALSE;
GETWINDOWINFO lpfgwi = (GETWINDOWINFO)GetProcAddress(hMod,
"GetWindowInfo");
if(!lpfgwi)return FALSE;
FreeLibrary(hMod);
return lpfgwi(hwnd,pwi);
}
int main()
{
WINDOWINFO wi;
HWND hwnd = GetDesktopWindow();
BOOL bRes = GetWindowInfo(hwnd,&wi);//simple example
return 0;
}