diff --git a/minipath/minipath.vcxproj b/minipath/minipath.vcxproj
index 99e33b599..bc21f147d 100644
--- a/minipath/minipath.vcxproj
+++ b/minipath/minipath.vcxproj
@@ -22,28 +22,28 @@
{781B17E7-427F-488F-A8E9-360BA38A10F3}
- 7.0
+ 10.0.14393.0
minipath
Application
- v141_xp
+ v141
false
Unicode
Application
- v141_xp
+ v141
false
Unicode
- v141_xp
+ v141
Unicode
- v141_xp
+ v141
Unicode
diff --git a/minipath/src/minipath.c b/minipath/src/minipath.c
index ac9ae061f..442c4f99e 100644
--- a/minipath/src/minipath.c
+++ b/minipath/src/minipath.c
@@ -181,8 +181,12 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
g_hInstance = hInstance;
// Set the Windows version global variable
+ #pragma warning (push)
+ #pragma warning (disable : 4996 ) /* deprecated method */
+ #pragma message ("TODO: use #include to replace GetVersion() ")
g_uWinVer = LOWORD(GetVersion());
g_uWinVer = MAKEWORD(HIBYTE(g_uWinVer),LOBYTE(g_uWinVer));
+ #pragma warning (pop)
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
diff --git a/np3encrypt/np3encrypt.vcxproj b/np3encrypt/np3encrypt.vcxproj
index 53acc72a0..1cf86dfd2 100644
--- a/np3encrypt/np3encrypt.vcxproj
+++ b/np3encrypt/np3encrypt.vcxproj
@@ -23,33 +23,33 @@
{0210F830-26C6-40FC-BFD1-6ED833B90830}
Win32Proj
np3encrypt
- 8.1
+ 10.0.14393.0
np3encrypt
Application
true
- v141_xp
+ v141
Unicode
Application
false
- v141_xp
+ v141
true
Unicode
Application
true
- v141_xp
+ v141
Unicode
Application
false
- v141_xp
+ v141
true
Unicode
diff --git a/scintilla/Scintilla.vcxproj b/scintilla/Scintilla.vcxproj
index 2a014b960..bb35a9098 100644
--- a/scintilla/Scintilla.vcxproj
+++ b/scintilla/Scintilla.vcxproj
@@ -23,7 +23,7 @@
{5877B917-512B-49F5-B514-1B4159E7A9CA}
Scintilla
Scintilla
- 7.0
+ 10.0.14393.0
@@ -32,7 +32,7 @@
v100
v120_xp
v140_xp
- v141_xp
+ v141
Unicode
@@ -40,7 +40,7 @@
v100
v120_xp
v140_xp
- v141_xp
+ v141
Unicode
@@ -48,7 +48,7 @@
v100
v120_xp
v140_xp
- v141_xp
+ v141
true
@@ -57,7 +57,7 @@
v100
v120_xp
v140_xp
- v141_xp
+ v141
true
diff --git a/src/Edit.c b/src/Edit.c
index 85175aeb9..abab92174 100644
--- a/src/Edit.c
+++ b/src/Edit.c
@@ -38,7 +38,6 @@
#define LCMAP_TITLECASE 0x00000300 // Title Case Letters bit mask
#endif
-extern UINT16 g_uWinVer;
extern HWND hwndMain;
extern HWND hwndEdit;
extern HINSTANCE g_hInstance;
@@ -1975,7 +1974,7 @@ void EditTitleCase(HWND hwnd)
cpEdit = Encoding_SciGetCodePage(hwnd);
cchTextW = MultiByteToWideChar(cpEdit,0,pszText,iSelLength,pszTextW,iSelLength);
- if (IsW7()) {
+ if (IsWin7()) {
LPWSTR pszMappedW = LocalAlloc(LPTR,GlobalSize(pszTextW));
diff --git a/src/Helpers.c b/src/Helpers.c
index e4c1ae8e1..02251e862 100644
--- a/src/Helpers.c
+++ b/src/Helpers.c
@@ -29,7 +29,6 @@
#include "helpers.h"
extern HINSTANCE g_hInstance;
-extern UINT16 g_uWinVer;
//=============================================================================
//
diff --git a/src/Helpers.h b/src/Helpers.h
index d937ff501..36c6c01d0 100644
--- a/src/Helpers.h
+++ b/src/Helpers.h
@@ -16,11 +16,13 @@
#ifndef _NP3_HELPERS_H_
#define _NP3_HELPERS_H_
+
+#include
#define STRSAFE_NO_CB_FUNCTIONS
-// don't allow deprecated functions
-#undef STRSAFE_NO_DEPRECATE
+#undef STRSAFE_NO_DEPRECATE // don't allow deprecated functions
#include
+
#define STRGFY(X) L##X
#define MKWSTRG(strg) STRGFY(strg)
@@ -60,10 +62,30 @@ __inline BOOL IniSectionSetInt(LPWSTR lpCachedIniSection,LPCWSTR lpName,int i) {
#define EndWaitCursor() { POINT pt; SendMessage(hwndEdit,SCI_SETCURSOR,(WPARAM)SC_CURSORNORMAL,0); GetCursorPos(&pt); SetCursorPos(pt.x,pt.y); }
-#define Is2k() (g_uWinVer >= 0x0500)
-#define IsXP() (g_uWinVer >= 0x0501)
-#define IsVista() (g_uWinVer >= 0x0600)
-#define IsW7() (g_uWinVer >= 0x0601)
+//#define Is2k() (g_uWinVer >= 0x0500)
+#define IsXP() IsWindowsXPOrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP version.
+#define IsXP1() IsWindowsXPSP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 1 (SP1)version.
+#define IsXP2() IsWindowsXPSP2OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 2 (SP2)version.
+#define IsXP3() IsWindowsXPSP3OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows XP with Service Pack 3 (SP3)version.
+
+#define IsVista() IsWindowsVistaOrGreater() // Indicates if the current OS version matches,or is greater than,the Windows Vista version.
+#define IsVista1() IsWindowsVistaSP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows Vista with Service Pack 1 (SP1)version.
+#define IsVista2() IsWindowsVistaSP2OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows Vista with Service Pack 2 (SP2)version.
+
+#define IsWin7() IsWindows7OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 7 version.
+#define IsWin71() IsWindows7SP1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 7 with Service Pack 1 (SP1)version.
+#define IsWin8() IsWindows8OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 8 version.
+#define IsWin81() IsWindows8Point1OrGreater() // Indicates if the current OS version matches,or is greater than,the Windows 8.1 version.
+ // For Windows 10,IsWindows8Point1OrGreater returns false unless the application contains a manifest that includes
+ // a compatibility section that contains the GUIDs that designate Windows 8.1 and/or Windows 10.
+
+#define IsWin10() IsWindows10OrGreater() // Indicates if the current OS version matches, or is greater than, the Windows 10 version.
+ // For Windows 10,IsWindows10OrGreater returns false unless the application contains a manifest that includes
+ // a compatibility section that contains the GUID that designates Windows 10.
+
+#define IsWinServer() IsWindowsServer() // Indicates if the current OS is a Windows Server release.
+ // Applications that need to distinguish between server and client versions of Windows should call this function.
+
enum BufferSizes {
MICRO_BUFFER = 32,
diff --git a/src/Notepad3.c b/src/Notepad3.c
index a8d390202..2dcd13676 100644
--- a/src/Notepad3.c
+++ b/src/Notepad3.c
@@ -290,7 +290,6 @@ WCHAR wchWndClass[16] = WC_NOTEPAD3;
HINSTANCE g_hInstance;
HANDLE g_hScintilla;
-UINT16 g_uWinVer;
WCHAR g_wchAppUserModelID[32] = { L'\0' };
WCHAR g_wchWorkingDirectory[MAX_PATH] = { L'\0' };
@@ -601,10 +600,6 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
// Set global variable g_hInstance
g_hInstance = hInstance;
- // Set the Windows version global variable
- g_uWinVer = LOWORD(GetVersion());
- g_uWinVer = MAKEWORD(HIBYTE(g_uWinVer),LOBYTE(g_uWinVer));
-
// Don't keep working directory locked
GetCurrentDirectory(COUNTOF(g_wchWorkingDirectory),g_wchWorkingDirectory);
GetModuleFileName(NULL,wchWorkingDirectory,COUNTOF(wchWorkingDirectory));
@@ -613,8 +608,8 @@ int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInst,LPSTR lpCmdLine,int n
SetErrorMode(SEM_FAILCRITICALERRORS|SEM_NOOPENFILEERRORBOX);
- // check if running at least on Windows 2000
- if (!Is2k()) {
+ // check if running at least on Windows XP
+ if (!IsXP()) {
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER|
diff --git a/src/Notepad3.rc b/src/Notepad3.rc
index 6547a7497..444a7d1b9 100644
Binary files a/src/Notepad3.rc and b/src/Notepad3.rc differ
diff --git a/src/Notepad3.vcxproj b/src/Notepad3.vcxproj
index 3e96b9490..293462138 100644
--- a/src/Notepad3.vcxproj
+++ b/src/Notepad3.vcxproj
@@ -23,34 +23,34 @@
Win32Proj
{BAAD32AB-CD47-12FD-873C-0BBC204B7641}
Notepad3
- 8.1
+ 10.0.14393.0
Unicode
Application
- v141_xp
+ v141
true
true
Unicode
Application
- v141_xp
+ v141
false
true
Unicode
Application
- v141_xp
+ v141
true
true
Unicode
Application
- v141_xp
+ v141
false
true