X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5d44b24ee63543390aa28e1eb4ff162da4264838..71110b404c5cbef2175b2be645783e93d9a2b8c4:/src/os2/frame.cpp diff --git a/src/os2/frame.cpp b/src/os2/frame.cpp index 261c01de4c..c2e3d87c83 100644 --- a/src/os2/frame.cpp +++ b/src/os2/frame.cpp @@ -30,6 +30,7 @@ #include "wx/dialog.h" #include "wx/settings.h" #include "wx/dcclient.h" + #include "wx/mdi.h" #endif // WX_PRECOMP #include "wx/os2/private.h" @@ -52,7 +53,6 @@ extern wxWindowList wxModelessWindows; extern wxList WXDLLEXPORT wxPendingDelete; -extern const wxChar* wxFrameClassName; #if wxUSE_MENUS_NATIVE extern wxMenu *wxCurrentPopupMenu; @@ -144,7 +144,6 @@ bool wxFrame::Create( ,rsName )) return FALSE; - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); wxModelessWindows.Append(this); return TRUE; } // end of wxFrame::Create @@ -211,21 +210,6 @@ void wxFrame::Raise() ); } -// generate an artificial resize event -void wxFrame::SendSizeEvent() -{ - if (!m_bIconized) - { - RECTL vRect = wxGetWindowRect(GetHwnd()); - - (void)::WinPostMsg( m_hFrame - ,WM_SIZE - ,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom) - ,MPFROM2SHORT(vRect.xRight - vRect.xLeft, vRect.yTop - vRect.yBottom) - ); - } -} - #if wxUSE_STATUSBAR wxStatusBar* wxFrame::OnCreateStatusBar( int nNumber @@ -248,6 +232,26 @@ wxStatusBar* wxFrame::OnCreateStatusBar( if( !pStatusBar ) return NULL; + wxClientDC vDC(pStatusBar); + int nY; + + // + // Set the height according to the font and the border size + // + vDC.SetFont(pStatusBar->GetFont()); // Screws up the menues for some reason + vDC.GetTextExtent( "X" + ,NULL + ,&nY + ); + + int nHeight = ((11 * nY) / 10 + 2 * pStatusBar->GetBorderY()); + + pStatusBar->SetSize( -1 + ,-1 + ,-1 + ,nHeight + ); + ::WinSetParent( pStatusBar->GetHWND() ,m_hFrame ,FALSE @@ -449,7 +453,7 @@ void wxFrame::OnSysColourChanged( wxSysColourChangedEvent& rEvent ) { - SetBackgroundColour(wxSystemSettings::GetSystemColour(wxSYS_COLOUR_APPWORKSPACE)); + SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE)); Refresh(); #if wxUSE_STATUSBAR @@ -1075,7 +1079,6 @@ bool wxFrame::HandleSize( vEvent.SetEventObject(this); bProcessed = GetEventHandler()->ProcessEvent(vEvent); - AlterChildPos(); } return bProcessed; } // end of wxFrame::HandleSize