applied patch #428104 (SetSizeHints() for wxMDIChildFrame)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -873,10 +873,8 @@ long wxMDIChildFrame::MSWWindowProc(WXUINT message,
|
||||
break;
|
||||
|
||||
case WM_GETMINMAXINFO:
|
||||
// let the default window proc calculate the size of MDI children
|
||||
// frames because it is based on the size of the MDI client window,
|
||||
// not on the values specified in wxWindow m_min/max variables
|
||||
return MSWDefWindowProc(message, wParam, lParam);
|
||||
processed = HandleGetMinMaxInfo((MINMAXINFO *)lParam);
|
||||
break;
|
||||
|
||||
case WM_MDIACTIVATE:
|
||||
{
|
||||
@@ -1040,6 +1038,33 @@ bool wxMDIChildFrame::HandleWindowPosChanging(void *pos)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool wxMDIChildFrame::HandleGetMinMaxInfo(void *mmInfo)
|
||||
{
|
||||
MINMAXINFO *info = (MINMAXINFO *)mmInfo;
|
||||
|
||||
// let the default window proc calculate the size of MDI children
|
||||
// frames because it is based on the size of the MDI client window,
|
||||
// not on the values specified in wxWindow m_max variables
|
||||
bool processed = MSWDefWindowProc(WM_GETMINMAXINFO, 0, (LPARAM)mmInfo);
|
||||
|
||||
// but allow GetSizeHints() to set the min size
|
||||
if ( m_minWidth != -1 )
|
||||
{
|
||||
info->ptMinTrackSize.x = m_minWidth;
|
||||
|
||||
processed = TRUE;
|
||||
}
|
||||
|
||||
if ( m_minHeight != -1 )
|
||||
{
|
||||
info->ptMinTrackSize.y = m_minHeight;
|
||||
|
||||
processed = TRUE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// MDI specific message translation/preprocessing
|
||||
// ---------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user