From bcc1153a9ef9571045768f698901b096f35034cd Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 17 Feb 2006 21:25:05 +0000 Subject: [PATCH] compilation fix for old SDK headers (such as shipped with VC6) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37629 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/display.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/msw/display.cpp b/src/msw/display.cpp index 536bd14811..59367a8f7e 100644 --- a/src/msw/display.cpp +++ b/src/msw/display.cpp @@ -58,6 +58,19 @@ #ifndef __WXWINCE__ #include + + // HMONITOR can be declared either in new enough windef.h or in multimon.h + // itself if _WIN32_WINNT < 0x0500, but the trouble is that we set + // _WIN32_WINNT to maximal possible value ourselves in wx/msw/wrapwin.h so + // that multimon.h doesn't define it but with old headers, neither does + // windef.h, in spite of _WIN32_WINNT value. Even more unfortunately, we + // can't directly test whether HMONITOR is defined or not in windef.h as + // it's not a macro but a typedef, so we test for an unrelated symbol which + // is only defined in winuser.h if WINVER >= 0x0500 + #if !defined(HMONITOR_DECLARED) && !defined(MNS_NOCHECK) + DECLARE_HANDLE(HMONITOR); + #define HMONITOR_DECLARED + #endif #endif // !__WXWINCE__ #ifdef _MSC_VER -- 2.45.2