m_winLastFocused = (wxWindow *)NULL;
-#ifdef __SMARTPHONE__
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
m_MenuBarHWND = 0;
#endif
}
(style & ~wxBORDER_MASK) | wxBORDER_NONE, exflags
) & ~WS_CHILD & ~WS_VISIBLE;
-#if defined(__WXWINCE__) && _WIN32_WCE < 400
+ // For some reason, WS_VISIBLE needs to be defined on creation for
+ // SmartPhone 2003. The title can fail to be displayed otherwise.
+#if defined(__SMARTPHONE__) || (defined(__WXWINCE__) && _WIN32_WCE < 400)
msflags |= WS_VISIBLE;
+ ((wxTopLevelWindowMSW*)this)->wxWindowBase::Show(true);
#endif
// first select the kind of window being created
//
// note that if we don't set WS_POPUP, Windows assumes WS_OVERLAPPED and
- // creates a window with both caption and border, hence we also test it
- // below in some other cases
- if ( style & wxFRAME_TOOL_WINDOW )
- {
- msflags |= WS_POPUP;
- }
- //else: WS_OVERLAPPED is 0 anyhow, so it is on by default
+ // creates a window with both caption and border, hence we need to use
+ // WS_POPUP in a few cases just to avoid having caption/border which we
+ // don't want
-#ifndef __SMARTPHONE__
+#if !(defined(__SMARTPHONE__) && defined(__WXWINCE__))
// border and caption styles
if ( style & wxRESIZE_BORDER )
msflags |= WS_THICKFRAME;
}
SubclassWin(m_hWnd);
+
+#ifdef __SMARTPHONE__
+ // Work around title non-display glitch
+ Show(false);
+#endif
return true;
#endif // __WXMICROWIN__/!__WXMICROWIN__
wxSize sz(size);
#endif
- return MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags);
+ bool result = MSWCreate(wxCanvasClassName, title, pos, sz, flags, exflags);
+
+#ifdef __SMARTPHONE__
+ // Work around title non-display glitch
+ Show(false);
+#endif
+ return result;
}
bool wxTopLevelWindowMSW::Create(wxWindow *parent,
}
#endif
-#ifdef __SMARTPHONE__
+#if defined(__SMARTPHONE__) && defined(__WXWINCE__)
SetRightMenu(); // to nothing for initialization
#endif
nShowCmd = SW_MAXIMIZE;
// This is necessary, or no window appears
-#ifdef __WINCE_STANDARDSDK__
+#if defined( __WINCE_STANDARDSDK__) || defined(__SMARTPHONE__)
DoShowWindow(SW_SHOW);
#endif
void wxTopLevelWindowMSW::RequestUserAttention(int flags)
{
- // check if we can use FlashWindowEx()
-#ifdef FLASHW_STOP
+ // 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;
s_pfnFlashWindowEx(&fwi);
}
else // FlashWindowEx() not available
-#endif // FLASHW_STOP
+#endif // FlashWindowEx() defined
{
wxUnusedVar(flags);
#ifndef __WXWINCE__