bool result = MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags);
-#ifdef __SMARTPHONE__
- // Work around title non-display glitch
- Show(false);
-#endif
return result;
}
);
}
- // 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 )
{
// we can't maximize the hidden frame because it shows it as well, so
// just remember that we should do it later in this case
m_maximizeOnShow = maximize;
+
+ // after calling Maximize() the client code expects to get the frame
+ // "real" size and doesn't want to know that, because of implementation
+ // details, the frame isn't really maximized yet but will be only once
+ // it's shown, so return our size as it will be then in this case
+
+ // we don't know which display we're on yet so use the default one
+ SetSize(wxGetClientDisplayRect().GetSize());
}
}
#ifdef __WXWINCE__
return false;
#else
- return ::IsZoomed(GetHwnd()) != 0;
+ return m_maximizeOnShow || ::IsZoomed(GetHwnd()) != 0;
#endif
}
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);
rect.y = 0;
#endif
}
-#endif // wxUSE_DISPLAY
SetSize(rect);
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;
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
}