// ----------------------------------------------------------------------------
extern wxWindowList wxModelessWindows;
-extern wxList WXDLLEXPORT wxPendingDelete;
extern const wxChar *wxFrameClassName;
#if wxUSE_MENUS_NATIVE
{
SetName(name);
m_windowStyle = style;
-#if wxUSE_MENUS
- m_frameMenuBar = NULL;
-#endif // wxUSE_MENUS
-#if wxUSE_TOOLBAR
- m_frameToolBar = NULL;
-#endif // wxUSE_TOOLBAR
-#if wxUSE_STATUSBAR
- m_frameStatusBar = NULL;
-#endif // wxUSE_STATUSBAR
SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE));
wxTopLevelWindows.Append(this);
- MSWCreate(m_windowId, parent, wxFrameClassName, this, title,
+ // the frame must have NULL parent HWND or it would be always on top of its
+ // parent which is not what we usually want (in fact, we only want it for
+ // frames with the special wxFRAME_TOOL_WINDOW style handled elsewhere)
+ MSWCreate(m_windowId, NULL, wxFrameClassName, this, title,
x, y, width, height, style);
wxModelessWindows.Append(this);
return TRUE;
}
+void wxFrameMSW::Raise()
+{
+#ifdef __WIN16__
+ // no SetForegroundWindow() in Win16
+ wxFrameBase::Raise();
+#else // Win32
+ ::SetForegroundWindow(GetHwnd());
+#endif // Win16/32
+}
+
void wxFrameMSW::Iconize(bool iconize)
{
DoShowWindow(iconize ? SW_MINIMIZE : SW_RESTORE);
void wxFrameMSW::AttachMenuBar(wxMenuBar *menubar)
{
+ wxFrameBase::AttachMenuBar(menubar);
+
if ( !menubar )
{
// actually remove the menu from the frame
{
m_hMenu = menubar->GetHMenu();
}
- else
+ else // no HMENU yet
{
- if ( menubar->IsAttached() )
- menubar->Detach();
-
m_hMenu = menubar->Create();
if ( !m_hMenu )
+ {
+ wxFAIL_MSG( _T("failed to create menu bar") );
return;
+ }
}
InternalSetMenuBar();
LONG offFlags = 0;
if (style & wxFULLSCREEN_NOBORDER)
- offFlags |= WS_BORDER;
+ offFlags |= WS_BORDER | WS_THICKFRAME;
if (style & wxFULLSCREEN_NOCAPTION)
offFlags |= (WS_CAPTION | WS_SYSMENU);