diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 8c1b178657..113420452e 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -286,6 +286,13 @@ void wxFrame::PositionStatusBar() int w, h; GetClientSize(&w, &h); + // Resize the status bar to its default height, as it could have been set + // to a wrong value before by WM_SIZE sent during the frame creation and + // our status bars preserve their programmatically set size to avoid being + // resized by DefWindowProc() to the full window width, so if we didn't do + // this here, the status bar would retain the possibly wrong current height. + m_frameStatusBar->SetSize(wxDefaultSize, wxSIZE_AUTO_HEIGHT); + int sw, sh; m_frameStatusBar->GetSize(&sw, &sh);