From 78fbcd20fa8629ef45dcb32159bb4a5c0315cb60 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Wed, 9 Nov 2022 08:28:30 +0100 Subject: [PATCH] +fix: set correct _WIN32_WINNT version (0x0601 /*_WIN32_WINNT_WIN7*/) --- scintilla/win32/PlatWin.cxx | 8 ++++---- scintilla/win32/ScintillaWin.cxx | 10 ++++++---- src/Helpers.c | 1 + 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/scintilla/win32/PlatWin.cxx b/scintilla/win32/PlatWin.cxx index dd032e058..bd75b185c 100644 --- a/scintilla/win32/PlatWin.cxx +++ b/scintilla/win32/PlatWin.cxx @@ -28,11 +28,11 @@ #define NOMINMAX #endif #undef _WIN32_WINNT -//~#define _WIN32_WINNT 0x0601 /*_WIN32_WINNT_WIN7*/ -#define _WIN32_WINNT 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ +#define _WIN32_WINNT 0x0601 /*_WIN32_WINNT_WIN7*/ +//~#define _WIN32_WINNT 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ #undef WINVER -//~#define WINVER 0x0601 /*_WIN32_WINNT_WIN7*/ -#define WINVER 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ +#define WINVER 0x0601 /*_WIN32_WINNT_WIN7*/ +//~#define WINVER 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ #define WIN32_LEAN_AND_MEAN 1 #include #include diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index a03828e5d..4e9c7c31a 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -32,11 +32,11 @@ #define NOMINMAX #endif #undef _WIN32_WINNT -//~#define _WIN32_WINNT 0x0601 /*_WIN32_WINNT_WIN7*/ -#define _WIN32_WINNT 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ +#define _WIN32_WINNT 0x0601 /*_WIN32_WINNT_WIN7*/ +//~#define _WIN32_WINNT 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ #undef WINVER -//~#define WINVER 0x0601 /*_WIN32_WINNT_WIN7*/ -#define WINVER 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ +#define WINVER 0x0601 /*_WIN32_WINNT_WIN7*/ +//~#define WINVER 0x0A00 /*_WIN32_WINNT_WINTHRESHOLD, _WIN32_WINNT_WIN10*/ #define WIN32_LEAN_AND_MEAN 1 #include #include @@ -2108,6 +2108,7 @@ sptr_t ScintillaWin::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { InvalidateStyleRedraw(); break; +#if(WINVER >= 0x0605) case WM_DPICHANGED_AFTERPARENT: { const UINT dpiNow = DpiForWindow(wMain.GetID()); if (dpi != dpiNow) { @@ -2116,6 +2117,7 @@ sptr_t ScintillaWin::WndProc(Message iMessage, uptr_t wParam, sptr_t lParam) { } } break; +#endif // >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>> #if SCI_EnablePopupMenu diff --git a/src/Helpers.c b/src/Helpers.c index d6409cc69..345126497 100644 --- a/src/Helpers.c +++ b/src/Helpers.c @@ -1920,6 +1920,7 @@ LPCTSTR const lpszUnsafeChars = L" \"\\<>{|}^`"; void UrlEscapeEx(LPCWSTR lpURL, LPWSTR lpEscaped, DWORD* pcchEscaped, bool bEscReserved) { #if (NTDDI_VERSION >= NTDDI_WIN8) + UNREFERENCED_PARAMETER(bEscReserved); UrlEscape(lpURL, lpEscaped, pcchEscaped, (URL_ESCAPE_SEGMENT_ONLY | URL_ESCAPE_URI_COMPONENT)); #else //UrlEscape(lpURL, lpEscaped, pcchEscaped, (URL_ESCAPE_SEGMENT_ONLY | URL_ESCAPE_PERCENT | URL_ESCAPE_AS_UTF8));