Allow using sizers for laying out wxMDIClientWindow in wxMSW.

Let the user code put wxMDIParentFrame::GetClientWindow() into a sizer and
manage it as any other window, instead of having to do it manually.

Closes #16196.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76473 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-05-06 18:20:38 +00:00
parent 3f7086de4c
commit 5b56498f88
2 changed files with 12 additions and 5 deletions

View File

@ -69,6 +69,7 @@ wxMSW:
- Add support for saving 256*256 32bpp ICOs in PNG format (Artur Wieczorek).
- Keep menu item icon after removing and adding it back (Artur Wieczorek).
- Add wxThread::MSWGetHandle() (troelsk).
- Allow using sizers for laying out wxMDIClientWindow (Artur Wieczorek).
wxOSX/Cocoa:

View File

@ -38,6 +38,7 @@
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/sizer.h"
#include "wx/toolbar.h"
#endif
@ -467,12 +468,17 @@ WXHMENU wxMDIParentFrame::MSWGetActiveMenu() const
void wxMDIParentFrame::UpdateClientSize()
{
if ( GetClientWindow() )
{
int width, height;
GetClientSize(&width, &height);
int width, height;
GetClientSize(&width, &height);
GetClientWindow()->SetSize(0, 0, width, height);
if ( wxSizer* sizer = GetSizer() )
{
sizer->SetDimension(0, 0, width, height);
}
else
{
if ( GetClientWindow() )
GetClientWindow()->SetSize(0, 0, width, height);
}
}