X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9cce2fe26c25ba4c16e61a2a8447667c7ee3e98b..6b5e5f48053ab30f80367a2f5b32834260080ab6:/src/msw/toplevel.cpp diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index ac97ecbbef..4324dca617 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -447,10 +447,6 @@ bool wxTopLevelWindowMSW::CreateFrame(const wxString& title, bool result = MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags); -#ifdef __SMARTPHONE__ - // Work around title non-display glitch - Show(false); -#endif return result; } @@ -548,9 +544,8 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent, ); } - // Native look is full screen window on Smartphones and Standard SDK. - // TODO: check that we need this (if we're passing default values to ctor). - // Also check that there really is a difference between PocketPC and Smartphone in this regard. + // Note: if we include PocketPC in this test, dialogs can fail to show up, + // for example the text entry dialog in the dialogs sample. Problem with Maximise()? #if defined(__WXWINCE__) && (defined(__SMARTPHONE__) || defined(__WINCE_STANDARDSDK__)) if ( style & wxMAXIMIZE ) { @@ -762,7 +757,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style) rect = wxDisplay(dpy).GetGeometry(); } else // fall back to the main desktop -#else // wxUSE_DISPLAY +#endif // wxUSE_DISPLAY { // resize to the size of the desktop wxCopyRECTToRect(wxGetWindowRect(::GetDesktopWindow()), rect); @@ -773,7 +768,6 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style) rect.y = 0; #endif } -#endif // wxUSE_DISPLAY SetSize(rect); @@ -933,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; @@ -946,7 +942,7 @@ void wxTopLevelWindowMSW::RequestUserAttention(int flags) s_pfnFlashWindowEx = (FlashWindowEx_t) dllUser32.GetSymbol(_T("FlashWindowEx")); - // we can safely unload user32.dll here, it's goign to remain loaded as + // we can safely unload user32.dll here, it's going to remain loaded as // long as the program is running anyhow }