// common part of Iconize(), Maximize() and Restore()
void DoShowWindow(int nShowCmd);
- // implement the geometry-related methods for a top level window
- virtual void DoSetClientSize(int width, int height);
- virtual void DoGetClientSize(int *width, int *height) const;
-
// get the MSW window flags corresponding to wxWindows ones
//
// the functions returns the flags (WS_XXX) directly and puts the ext
}
#endif // wxUSE_STATUSBAR
+ // call GetClientAreaOrigin() to take the toolbar into account
+ wxPoint pt = GetClientAreaOrigin();
+ width += pt.x;
+ height += pt.y;
+
wxTopLevelWindow::DoSetClientSize(width, height);
}
{
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 )
*exflags |= WS_EX_TOPMOST;
#ifdef __WIN32__
- if ( m_exStyle & wxFRAME_EX_CONTEXTHELP )
- *exflags |= WS_EX_CONTEXTHELP;
+ if ( m_exStyle & wxFRAME_EX_CONTEXTHELP )
+ *exflags |= WS_EX_CONTEXTHELP;
#endif // __WIN32__
}
}
}
-// ----------------------------------------------------------------------------
-// wxTopLevelWindowMSW client size
-// ----------------------------------------------------------------------------
-
-void wxTopLevelWindowMSW::DoSetClientSize(int width, int height)
-{
- // call GetClientAreaOrigin() to take the toolbar into account
- wxPoint pt = GetClientAreaOrigin();
- width += pt.x;
- height += pt.y;
-
- wxWindow::DoSetClientSize(width, height);
-}
-
-void wxTopLevelWindowMSW::DoGetClientSize(int *x, int *y) const
-{
- wxWindow::DoGetClientSize(x, y);
-
- wxPoint pt = GetClientAreaOrigin();
-
- if ( x )
- *x -= pt.x;
-
- if ( y )
- *y -= pt.y;
-}
-
// ----------------------------------------------------------------------------
// wxTopLevelWindowMSW showing
// ----------------------------------------------------------------------------