+ return false;
+ }
+ return true;
+}
+
+#endif // !__WXWINCE__
+
+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))
+ // available in the headers, check if it is supported by the system
+ typedef BOOL (WINAPI *FlashWindowEx_t)(FLASHWINFO *pfwi);
+ FlashWindowEx_t s_pfnFlashWindowEx = NULL;
+ if ( !s_pfnFlashWindowEx )
+ {
+ wxDynamicLibrary dllUser32(_T("user32.dll"));
+ s_pfnFlashWindowEx = (FlashWindowEx_t)
+ dllUser32.GetSymbol(_T("FlashWindowEx"));
+
+ // we can safely unload user32.dll here, it's goign to remain loaded as
+ // long as the program is running anyhow
+ }
+
+ if ( s_pfnFlashWindowEx )
+ {
+ WinStruct<FLASHWINFO> fwi;
+ fwi.hwnd = GetHwnd();
+ fwi.dwFlags = FLASHW_ALL;
+ if ( flags & wxUSER_ATTENTION_INFO )
+ {
+ // just flash a few times
+ fwi.uCount = 3;
+ }
+ else // wxUSER_ATTENTION_ERROR
+ {
+ // flash until the user notices it
+ fwi.dwFlags |= FLASHW_TIMERNOFG;
+ }
+
+ s_pfnFlashWindowEx(&fwi);
+ }
+ else // FlashWindowEx() not available
+#endif // FlashWindowEx() defined
+ {
+ wxUnusedVar(flags);
+#ifndef __WXWINCE__
+ ::FlashWindow(GetHwnd(), TRUE);
+#endif // __WXWINCE__