- m_iconized = FALSE;
- if ( !wxWindow::OS2Create(id, parent, wclass, wx_win, title, x, y, width, height,
- msflags, NULL, extendedStyle) )
- return FALSE;
+ //
+ // Save the number of fields in the statusbar
+ //
+ if ((lStyle & wxFULLSCREEN_NOSTATUSBAR) && pTheStatusBar)
+ {
+ m_nFsStatusBarFields = pTheStatusBar->GetFieldsCount();
+ SetStatusBar((wxStatusBar*) NULL);
+ delete pTheStatusBar;
+ }
+ else
+ m_nFsStatusBarFields = 0;
+
+ //
+ // Zap the frame borders
+ //
+
+ //
+ // Save the 'normal' window style
+ //
+ m_lFsOldWindowStyle = ::WinQueryWindowULong((HWND)GetHWND(), QWL_STYLE);
+
+ //
+ // Save the old position, width & height, maximize state
+ //
+ m_vFsOldSize = GetRect();
+ m_bFsIsMaximized = IsMaximized();
+
+ //
+ // Decide which window style flags to turn off
+ //
+ LONG lNewStyle = m_lFsOldWindowStyle;
+ LONG lOffFlags = 0;
+
+ if (lStyle & wxFULLSCREEN_NOBORDER)
+ lOffFlags |= FCF_BORDER;
+ if (lStyle & wxFULLSCREEN_NOCAPTION)
+ lOffFlags |= (FCF_TASKLIST | FCF_SYSMENU);
+
+ lNewStyle &= (~lOffFlags);
+
+ //
+ // Change our window style to be compatible with full-screen mode
+ //
+ ::WinSetWindowULong((HWND)GetHWND(), QWL_STYLE, (ULONG)lNewStyle);
+
+ //
+ // Resize to the size of the desktop
+ int nWidth;
+ int nHeight;
+
+ RECTL vRect;
+
+ ::WinQueryWindowRect(HWND_DESKTOP, &vRect);
+ nWidth = vRect.xRight - vRect.xLeft;
+ //
+ // Rmember OS/2 is backwards!
+ //
+ nHeight = vRect.yTop - vRect.yBottom;
+
+ SetSize( nWidth
+ ,nHeight
+ );
+
+ //
+ // Now flush the window style cache and actually go full-screen
+ //
+ ::WinSetWindowPos( (HWND) GetParent()->GetHWND()
+ ,HWND_TOP
+ ,0
+ ,0
+ ,nWidth
+ ,nHeight
+ ,SWP_SIZE | SWP_SHOW
+ );
+
+ wxSizeEvent vEvent( wxSize( nWidth
+ ,nHeight
+ )
+ ,GetId()
+ );
+
+ GetEventHandler()->ProcessEvent(vEvent);
+ return TRUE;
+ }
+ else
+ {
+ if (!IsFullScreen())
+ return FALSE;