| | @@ -4089,22 +4086,6 @@ |
4089 | 4086 | m_cFilter.Redraw(); |
4090 | 4087 | } |
4091 | 4088 | |
4092 | | -void CLogDlg::AdjustMinSize() |
4093 | | -{ |
4094 | | - // adjust the minimum size of the dialog to prevent the resizing from |
4095 | | - // moving the list control too far down. |
4096 | | - CRect rcChgListView; |
4097 | | - m_ChangedFileListCtrl.GetClientRect(rcChgListView); |
4098 | | - CRect rcLogList; |
4099 | | - m_LogList.GetClientRect(rcLogList); |
4100 | | - CRect rcLogMsg; |
4101 | | - GetDlgItem(IDC_MSGVIEW)->GetClientRect(rcLogMsg); |
4102 | | - |
4103 | | - SetMinTrackSize(CSize(m_DlgOrigRect.Width(), |
4104 | | - m_DlgOrigRect.Height()-m_ChgOrigRect.Height()-m_LogListOrigRect.Height()-m_MsgViewOrigRect.Height() |
4105 | | - +rcLogMsg.Height()+abs(rcChgListView.Height()-rcLogList.Height())+60)); |
4106 | | -} |
4107 | | - |
4108 | 4089 | LRESULT CLogDlg::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) |
4109 | 4090 | { |
4110 | 4091 | switch (message) { |
| | @@ -6337,7 +6318,53 @@ |
6337 | 6318 | { |
6338 | 6319 | __super::OnSize(nType, cx, cy); |
6339 | 6320 | //set range |
6340 | | - SetSplitterRange(); |
| 6321 | + if ((m_LogList) && (m_ChangedFileListCtrl)) |
| 6322 | + { |
| 6323 | + CRect rcTop; |
| 6324 | + m_LogList.GetWindowRect(rcTop); |
| 6325 | + ScreenToClient(rcTop); |
| 6326 | + |
| 6327 | + CRect rcMiddle; |
| 6328 | + GetDlgItem(IDC_MSGVIEW)->GetWindowRect(rcMiddle); |
| 6329 | + ScreenToClient(rcMiddle); |
| 6330 | + |
| 6331 | + CRect rcBottom; |
| 6332 | + m_ChangedFileListCtrl.GetWindowRect(rcBottom); |
| 6333 | + ScreenToClient(rcBottom); |
| 6334 | + |
| 6335 | + if (rcMiddle.Height() < 100) |
| 6336 | + { |
| 6337 | + CRect rc; |
| 6338 | + m_wndSplitter2.GetWindowRect(&rc); |
| 6339 | + ScreenToClient(rc); |
| 6340 | + rc.MoveToY(rc.top + 20); |
| 6341 | + m_wndSplitter2.MoveWindow(&rc); |
| 6342 | + DoSizeV2(20); |
| 6343 | + } |
| 6344 | + |
| 6345 | + if (rcTop.Height() < 100) |
| 6346 | + { |
| 6347 | + CRect rc; |
| 6348 | + m_wndSplitter1.GetWindowRect(&rc); |
| 6349 | + ScreenToClient(rc); |
| 6350 | + rc.MoveToY(rc.top + 20); |
| 6351 | + m_wndSplitter1.MoveWindow(&rc); |
| 6352 | + DoSizeV1(20); |
| 6353 | + } |
| 6354 | + |
| 6355 | + m_LogList.GetWindowRect(rcTop); |
| 6356 | + ScreenToClient(rcTop); |
| 6357 | + |
| 6358 | + GetDlgItem(IDC_MSGVIEW)->GetWindowRect(rcMiddle); |
| 6359 | + ScreenToClient(rcMiddle); |
| 6360 | + |
| 6361 | + m_ChangedFileListCtrl.GetWindowRect(rcBottom); |
| 6362 | + ScreenToClient(rcBottom); |
| 6363 | + |
| 6364 | + m_wndSplitter1.SetRange(rcTop.top + 20, rcBottom.bottom - 50); |
| 6365 | + m_wndSplitter2.SetRange(rcTop.top + 50, rcBottom.bottom - 20); |
| 6366 | + m_wndSplitterLeft.SetRange(80, rcTop.right - m_LogListOrigRect.Width()); |
| 6367 | + } |
6341 | 6368 | } |
6342 | 6369 | |
6343 | 6370 | void CLogDlg::OnRefresh() |