What value should WINVER be for Windows 10?

470 Views Asked by At

In my stdafx.h file I have:

#ifndef WINVER              // Allow use of features specific to Windows 2000 or later.
#define WINVER 0x0501       // Change this to the appropriate value to target other versions of Windows.
#endif

How do I find out what the value should be for Windows 10? I want this to be the minimum supported platform for my MFC project now.

1

There are 1 best solutions below

0
Chuck Walbourn On BEST ANSWER

If you want to build using APIs that are available in Windows 10 or later, then you'd use:

#include <winsdkver.h>
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0A00
#endif
#include <sdkddkver.h>

See Microsoft Docs.

Per the comment, you probably also want to set the linker minimum supported OS to 10.0.