Use parents client size and origin in placement of controls.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-02-11 06:56:47 +00:00
parent 6bee5ffba4
commit be4e4e27aa
4 changed files with 45 additions and 16 deletions

View File

@@ -183,6 +183,10 @@ void wxFrame::DoSetClientSize(int width, int height)
// Get size *available for subwindows* i.e. excluding menu bar, toolbar etc.
void wxFrame::DoGetClientSize(int *x, int *y) const
{
wxSize size = GetSize();
wxPoint pos = GetClientAreaOrigin();
*x = size.x - pos.x - 1;
*y = size.y - pos.y - 1;
}
// ----------------------------------------------------------------------------