Skip to content

Commit e7d2953

Browse files
authored
fix: fix build under windows 7 (#250)
* fix: fix build under windows 7 * fix: replace WIN32_WINNT macro check with predefined WM_* message in qwindowkit_windows.h * fix: remove unnecessary windows version check
1 parent 66d26d4 commit e7d2953

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

‎src/core/contexts/win32windowcontext.cpp‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,7 @@ namespace QWK {
401401
if (((message >= WM_NCCREATE) && (message <= WM_NCACTIVATE)) ||
402402
((message >= WM_NCMOUSEMOVE) && (message <= WM_NCMBUTTONDBLCLK)) ||
403403
((message >= WM_NCXBUTTONDOWN) && (message <= WM_NCXBUTTONDBLCLK))
404-
#if (WINVER >= _WIN32_WINNT_WIN8)
405404
|| ((message >= WM_NCPOINTERUPDATE) && (message <= WM_NCPOINTERUP))
406-
#endif
407405
|| ((message == WM_NCMOUSEHOVER) || (message == WM_NCMOUSELEAVE))) {
408406
return true;
409407
} else {

‎src/core/qwindowkit_windows.h‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,19 @@
6161
# define WM_NCUAHDRAWFRAME (0x00AF)
6262
#endif
6363

64+
// Required missing messages under windows 7
65+
#ifndef WM_NCPOINTERUPDATE
66+
# define WM_NCPOINTERUPDATE (0x0241)
67+
#endif
68+
69+
#ifndef WM_NCPOINTERDOWN
70+
# define WM_NCPOINTERDOWN (0x0242)
71+
#endif
72+
73+
#ifndef WM_NCPOINTERUP
74+
# define WM_NCPOINTERUP (0x0243)
75+
#endif
76+
6477
using QWK_OSVERSIONINFOW = struct _QWK_OSVERSIONINFOW {
6578
DWORD dwOSVersionInfoSize;
6679
DWORD dwMajorVersion;

0 commit comments

Comments
 (0)