Archived

This topic is now archived and is closed to further replies.

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

This topic is 5337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites