_WIN32_WINNT = 0x0501 in VC++ .net

Posted on 2003-02-25
Medium Priority
Last Modified: 2013-11-20
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.
Question by:Djof
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 32

Expert Comment

ID: 8024780
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.

Author Comment

ID: 8027081
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?

Accepted Solution

modulo earned 0 total points
ID: 8115305
PAQ'd and 100 points refunded


Community Support Moderator
Experts Exchange

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question