| | |
| | | CRect rcWnd; |
| | | GetWindowRect(&rcWnd); |
| | | int nHeight = GetSystemMetrics(SM_CYSCREEN) - rcWnd.bottom - 38; |
| | | if (nHeight < 280) nHeight = 280; |
| | | m_pAlarmDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), nHeight); |
| | | } |
| | | ASSERT(m_pAlarmDlg); |
| | |
| | | CRect rcWnd; |
| | | GetWindowRect(&rcWnd); |
| | | int nHeight = GetSystemMetrics(SM_CYSCREEN) - rcWnd.bottom - 38; |
| | | if (nHeight < 280) nHeight = 280; |
| | | m_pLogDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), nHeight); |
| | | } |
| | | ASSERT(m_pLogDlg); |
| | | m_pLogDlg->ShowWindow(m_bShowLogWnd ? SW_SHOW : SW_HIDE); |
| | | |
| | | |
| | | UpdateLogBtn(); |
| | | } |
| | | |
| | |
| | | CDialogEx::OnSize(nType, cx, cy); |
| | | if (GetDlgItem(IDC_SERVO_GRAPH1) == nullptr) return; |
| | | Resize(); |
| | | Invalidate(); |
| | | } |
| | | |
| | | void CServoDlg::Resize() |
| | |
| | | if (m_pLogDlg != nullptr && !m_pLogDlg->IsZoomed()) { |
| | | CRect rcWnd; |
| | | GetWindowRect(&rcWnd); |
| | | m_pLogDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), 200); |
| | | m_pLogDlg->SetWindowPos(nullptr, rcWnd.left, rcWnd.bottom - 8, 0, 0, SWP_NOSIZE); |
| | | } |
| | | |
| | | if (m_pAlarmDlg != nullptr && !m_pAlarmDlg->IsZoomed()) { |
| | | CRect rcWnd; |
| | | GetWindowRect(&rcWnd); |
| | | m_pAlarmDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), 200); |
| | | m_pAlarmDlg->SetWindowPos(nullptr, rcWnd.left, rcWnd.bottom - 8, 0, 0, SWP_NOSIZE); |
| | | } |
| | | |
| | | CDialogEx::OnMove(x, y); |