Link to home
Start Free TrialLog in
Avatar of Djof
Djof

asked on

_WIN32_WINNT = 0x0501 in VC++ .net

As soon as I modify my stdafx.h to define _WIN32_WINNT as 0x0501 (WinXP) instead of 0x0400 (Win2000) I get the following errors when I build.

c:\...\afxwin.h(3292) : error C2061: syntax error : identifier 'PSCROLLBARINFO'
c:\...\afxwin4.inl(148) : error C2065: 'PSCROLLBARINFO' : undeclared identifier
c:\...\afxwin4.inl(148) : error C2146: syntax error : missing ')' before identifier 'pScrollInfo'
c:\...\afxwin4.inl(148) : error C2761: 'BOOL CScrollBar::GetScrollBarInfo(void) const' : member function redeclaration not allowed
c:\...\afxwin4.inl(148) : error C2059: syntax error : ')'
c:\...\afxwin4.inl(149) : error C2143: syntax error : missing ';' before '{'
c:\...\afxwin4.inl(149) : error C2447: '{' : missing function header (old-style formal list?)
c:\...\afxcmn3.inl(18) : error C2065: 'CCM_SETWINDOWTHEME' : undeclared identifier

How can I define _WIN32_WINNT to WinXP without breaking MFC?

I am new to EE, so I'm setting this question as moderate, I don't know if it's enough, or too much.
Avatar of jhance
jhance

I think you are using an OLD version of the Windows Platform SDK.  Download the current SDK from MSDN.MICROSOFT.COM (it's a free download) and install it.  Be sure Visual Studio has IT in the include file and library search path instead of the old one and rebuild.
Avatar of Djof

ASKER

No, I'm not.

And I found how to do it. hehe. After 5 hours of poking around, I found I needed to also set the WINVER to 0x0501 and _WIN32_IE to 0x0600.

Now, how do I delete/null this question?
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial