////////////////// // Set each control's tofit (desired) size to current size. Useful for // dialogs, to "remember" the current sizes as desired size. // void CWinMgr::InitToFitSizeFromCurrent(CWnd* pWnd) { ASSERT(pWnd); ASSERT(m_map); GetWindowPositions(pWnd); for (WINRECT* w = m_map; !w->IsEnd(); w++) { if (w->Type()==WRCT_TOFIT && !w->IsGroup()) { w->SetToFitSize(w->GetRect().Size()); } } }
////////////////// // Set each control's tofit (desired) size to current size. Useful for // dialogs, to "remember" the current sizes as desired size. // void CWinMgr::InitToFitSizeFromCurrent(HWND hWnd) { assert(hWnd); assert(m_map); GetWindowPositions(hWnd); for (WINRECT* w = m_map; !w->IsEnd(); ++w) { if (w->Type()==WRCT_TOFIT && !w->IsGroup()) { w->SetToFitSize(RectToSize(w->GetRect())); } } }