From: Vadim Zeitlin Date: Tue, 7 Jun 2005 20:20:07 +0000 (+0000) Subject: don't use WINVER for tests, work around bug in VC6 headers in another way X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/3a6b0a3e5d5db2fdd8b49d1b124619770fb0e561 don't use WINVER for tests, work around bug in VC6 headers in another way git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 89571142bf..4324dca617 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -927,10 +927,12 @@ bool wxTopLevelWindowMSW::SetShape(const wxRegion& region) void wxTopLevelWindowMSW::RequestUserAttention(int flags) { - // check if we can use FlashWindowEx(): unfortunately an explicit test for - // FLASHW_STOP, for example, doesn't work because MSVC6 headers do #define - // it but don't provide FlashWindowEx() declaration -#if (WINVER >= 0x0500 && (defined FLASHW_STOP)) + // check if we can use FlashWindowEx(): unfortunately a simple test for + // FLASHW_STOP doesn't work because MSVC6 headers do #define it but don't + // provide FlashWindowEx() declaration, so try to detect whether we have + // real headers for WINVER 0x0500 by checking for existence of a symbol not + // declated in MSVC6 header +#if defined(FLASHW_STOP) && defined(VK_XBUTTON1) // available in the headers, check if it is supported by the system typedef BOOL (WINAPI *FlashWindowEx_t)(FLASHWINFO *pfwi); FlashWindowEx_t s_pfnFlashWindowEx = NULL;