Can't use WINDOWINFO structure with VC++ 6.0 and winXP

Started by
4 comments, last by Baine 20 years, 11 months ago
When trying to use a WINDOWINFO structure with Visual C++ 6.0, I don''t understand why it''s not working. for example.. the statement: WINDOWINFO wi; generates these errors: error C2065: ''WINDOWINFO'' : undeclared identifier error C2146: syntax error : missing '';'' before identifier ''wi'' error C2065: ''wi'' : undeclared identifier I also have problems trying to use one of the structures as the second parameter in the GetWindowInfo(HWND hwnd, PWINDOWINFO pwi); function. I''d imagine that both of these problems are related, but I''m not sure why they don''t work. I''ve included windows.h in my source, and the MSDN documentation says that''s all that is required. Any help with this problem would be great Thanks Ernie
groovy,ern
Advertisement
Sorry, can''t replicate the problem, works fine in my VC6. Maybe it''s only in the latest Platform SDK headers? Actually, I just checked the MSDN that comes with VC++, it''s not listed so this sounds likely (then again, that is a very old MSDN copy).
hmm.. weird problem it seems. Could be a configuration error on my end though. I wouldn't mind trying a newer version of the SDK headers, but I'm not sure where to obtain them. I'm also unfamiliar with what a SDK header is exactly haha, so at the risk of sounding like a complete newb, I'll ask for an explanation anyway

Ernie

[edited by - Baine on May 5, 2003 4:01:01 PM]
groovy,ern
An SDK header is just like any other header. JuNC seems to be correct though. You seem to need a newer version of the Platform SDK (which you can download from Microsoft) to use WINDOWINFO - but this seems strange to me since the structure is available in Win98 and up as well as WinNT SP3 and up


Qui fut tout, et qui ne fut rien
Invader''s Realm
you can probably use it just by adding this macro at the top of your stdafx.h file

#define WINVER 0x0500

of course if you have old headers it''ll give you a warning about it

Installing the new Platform SDK did the trick guys. Thank you very much for the help

Ernie
groovy,ern

This topic is closed to new replies.

Advertisement