where is WINVER set (resolved)
-
Windows XP, soo not be Win 7, Visual Studio 2008, C++ Every build proclaims that WINVER is not defined, setting to 0x600 Windows Vista. This is on Windows XP so I don't understand why it is setting to Vista. Where should it be set? stdafx has the lines: #ifndef WINVER #define WINVER 0x0400 // this line grayed out #endif That indicates it is already set, but the output window says not. I put this definition in the first include file AR2_Message_AppDlg.cpp #define WINVER 0X0601 but it appears to be ignored. An MSDN web page said to put it in "a header file." It does not say which one. Where should the definition be placed?
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
-
Windows XP, soo not be Win 7, Visual Studio 2008, C++ Every build proclaims that WINVER is not defined, setting to 0x600 Windows Vista. This is on Windows XP so I don't understand why it is setting to Vista. Where should it be set? stdafx has the lines: #ifndef WINVER #define WINVER 0x0400 // this line grayed out #endif That indicates it is already set, but the output window says not. I put this definition in the first include file AR2_Message_AppDlg.cpp #define WINVER 0X0601 but it appears to be ignored. An MSDN web page said to put it in "a header file." It does not say which one. Where should the definition be placed?
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
The Windows version is set from the SDK header files, so it does not necessarily match the actual level of Windows that you are developing on. You can set it to your own target in your main header file, before your include of windows.h; if using precompiled headers then that would be your version of stdafx.h.
-
Windows XP, soo not be Win 7, Visual Studio 2008, C++ Every build proclaims that WINVER is not defined, setting to 0x600 Windows Vista. This is on Windows XP so I don't understand why it is setting to Vista. Where should it be set? stdafx has the lines: #ifndef WINVER #define WINVER 0x0400 // this line grayed out #endif That indicates it is already set, but the output window says not. I put this definition in the first include file AR2_Message_AppDlg.cpp #define WINVER 0X0601 but it appears to be ignored. An MSDN web page said to put it in "a header file." It does not say which one. Where should the definition be placed?
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com
With visual studio "find in files", you can find all #define WINVER when look in "visual c++ include directories" I get: winres.h, sdkddkver.h, vdssys.idl, WinDef.h, WinGDI.h, WinReg.h, WinResrc.h, winsdkver.h and WinUser.h But you have to start follow the includes in your stdafx.h to find the ones your application is including. I see: #include "targetver.h" which includes #include which is one on my list and contains #ifndef WINVER #ifdef _WIN32_WINNT // set WINVER based on _WIN32_WINNT #define WINVER _WIN32_WINNT #else #define WINVER 0x0601 #endif #endif So if you put in stdafx.h #ifndef WINVER #define WINVER 0x0400 #endif before #include "targetver.h" then it is not grey out.
-
With visual studio "find in files", you can find all #define WINVER when look in "visual c++ include directories" I get: winres.h, sdkddkver.h, vdssys.idl, WinDef.h, WinGDI.h, WinReg.h, WinResrc.h, winsdkver.h and WinUser.h But you have to start follow the includes in your stdafx.h to find the ones your application is including. I see: #include "targetver.h" which includes #include which is one on my list and contains #ifndef WINVER #ifdef _WIN32_WINNT // set WINVER based on _WIN32_WINNT #define WINVER _WIN32_WINNT #else #define WINVER 0x0601 #endif #endif So if you put in stdafx.h #ifndef WINVER #define WINVER 0x0400 #endif before #include "targetver.h" then it is not grey out.
Ok, I am using that now, in stdafx.h Thank you for your time.
Thank you for your time If you work with telemetry, please check this bulletin board: www.irigbb.com