X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..8e92ccef9ce18df8c67d6105ac553dba93cf0e43:/src/msw/frame.cpp diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 76370db434..1bf777979b 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -157,6 +157,11 @@ void wxFrame::DoSetClientSize(int width, int height) } #endif // wxUSE_STATUSBAR + // call GetClientAreaOrigin() to take the toolbar into account + wxPoint pt = GetClientAreaOrigin(); + width += pt.x; + height += pt.y; + wxTopLevelWindow::DoSetClientSize(width, height); } @@ -165,6 +170,14 @@ void wxFrame::DoGetClientSize(int *x, int *y) const { wxTopLevelWindow::DoGetClientSize(x, y); + // account for the possible toolbar + wxPoint pt = GetClientAreaOrigin(); + if ( x ) + *x -= pt.x; + + if ( y ) + *y -= pt.y; + #if wxUSE_STATUSBAR // adjust client area height to take the status bar into account if ( y )