LRESULT CServerWnd::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { // arrange transferwindow layout case WM_PAINT: if (m_wndSplitter) { CRect rcWnd; GetWindowRect(rcWnd); if (rcWnd.Height() > 0) { CRect rcDown; serverlistctrl.GetWindowRect(rcDown); ScreenToClient(rcDown); // splitter paint update CRect rcSpl; rcSpl.left = 10; rcSpl.right = rcDown.right; rcSpl.top = rcDown.bottom + SVWND_SPLITTER_YOFF; rcSpl.bottom = rcSpl.top + SVWND_SPLITTER_HEIGHT; m_wndSplitter.MoveWindow(rcSpl, TRUE); UpdateSplitterRange(); } } break; } return CResizableDialog::DefWindowProc(message, wParam, lParam); }
void CServerWnd::DoResize(int delta) { CSplitterControl::ChangeHeight(&serverlistctrl, delta, CW_TOPALIGN); CSplitterControl::ChangeHeight(&StatusSelector, -delta, CW_BOTTOMALIGN); CSplitterControl::ChangeHeight(servermsgbox, -delta,CW_BOTTOMALIGN); CSplitterControl::ChangeHeight(logbox, -delta, CW_BOTTOMALIGN); CSplitterControl::ChangeHeight(debuglog, -delta, CW_BOTTOMALIGN); UpdateSplitterRange(); }
void CDlgMaintabDownload::DoResize(int delta) { CSplitterControl::ChangeHeight((CWnd*)&m_DownloadTabWnd, delta); CSplitterControl::ChangeHeight((CWnd*)&m_tabwndInfo, -delta, CW_BOTTOMALIGN); UpdateSplitterRange(); m_plcDownloading->Invalidate(); m_plcDownloading->UpdateWindow(); }
LRESULT CDlgMaintabDownload::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_PAINT: if (m_wndSplitter) { CRect rcWnd; GetWindowRect(rcWnd); if (rcWnd.Height() > 0) { CRect rcDown; m_DownloadTabWnd.GetWindowRect(rcDown); ScreenToClient(rcDown); // splitter paint update CRect rcSpl; rcSpl.left = rcDown.left; rcSpl.right = rcDown.right; rcSpl.top = rcDown.bottom; rcSpl.bottom = rcSpl.top + m_wndSplitter.GetHBreadth(); m_wndSplitter.MoveWindow(rcSpl, TRUE); UpdateSplitterRange(); } } //// Workaround to solve a glitch with WM_SETTINGCHANGE message //if (m_btnWnd1 && m_btnWnd1->m_hWnd && m_btnWnd1->GetBtnWidth(IDC_DOWNLOAD_ICO) != WND1_BUTTON_WIDTH) // m_btnWnd1->SetBtnWidth(IDC_DOWNLOAD_ICO, WND1_BUTTON_WIDTH); break; } return CResizableDialog::DefWindowProc(message, wParam, lParam); }