void CReBar::OnSize(DWORD type, WORD cx, WORD cy) { VERIFY(m_mdc.Create(cx, cy)); Draw(); if (cx == 0 || cy == 0) { MoveWindow(m_btnTools, 0, 0, 0, 0); MoveWindow(m_categoryBar, 0, 0, 0, 0); MoveWindow(m_eSearch, 0, 0, 0, 0); } else { MoveWindow(m_btnTools, cx - SCX(4) - SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24)); MoveWindow(m_btnSeen, cx - 2*SCX(4) - 2*SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24)); MoveWindow(m_btnSort, cx - 3*SCX(4) - 3*SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24)); MoveWindow(m_btnView, cx - 4 * SCX(4) - 4 * SCX(24), (cy - SCX(24)) / 2, SCX(24), SCX(24)); MoveWindow(m_categoryBar, 0, 0, cx - SCX(296), cy); MoveWindow(m_eSearch, cx - SCX(318), SCY(7), SCX(195), SCY(19), TRUE); //MoveWindow(m_categoryBar, 0, 0, cx - SCX(268), cy); //MoveWindow(m_eSearch, cx - SCX(257), SCY(7), SCX(195), SCY(19), TRUE); } PostMessage(m_hWnd, WM_PAINT); PostChildren(m_hWnd, WM_PAINT); }
void CLogWnd::OnSize(DWORD type, WORD cx, WORD cy) { UNREFERENCED_PARAMETER(type); MoveWindow(m_edit, 0, SCY(1), cx, cy - SCY(1)); PostMessage(m_hWnd, WM_PAINT); PostChildren(m_hWnd, WM_PAINT); }
void CToolBarTreeView::OnSize(DWORD type, WORD cx, WORD cy) { UNREFERENCED_PARAMETER(type); m_mdc.Create(cx, cy); Draw(); // TODO: detect size of border const int x = 2; const int y = 2; const int cx2 = cx - 2 * x; const int cy2 = cy - 2 * y; MoveWindow(m_tb, x, y, cx2, SCY(24)); MoveWindow(m_tv, x, y + SCY(24), cx2, cy2 - SCY(24)); PostMessage(m_hWnd, WM_PAINT); PostChildren(m_hWnd, WM_PAINT); }