Void CPaperManagementDlg: OnSize (UINT nType, int cx, int cy) { CDialog: OnSize (nType, cx, cy ); If (nType = 1) return; // if it is minimized, nothing will be done. // TODO: Add your message handler code here CWnd * pWnd; PWnd = GetDlgItem (IDC_STATIC ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_FILE_TREE ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_EDIT_NAME ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_EDIT_REFERENCE ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_EDIT_SUMMARY ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_EDIT_REMARK ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_BUTTON_UPDATE ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_BUTTON_SAVE ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_STATIC_1 ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_STATIC_2 ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_STATIC_3 ); ChangeSize (pWnd, cx, cy ); PWnd = GetDlgItem (IDC_STATIC_4 ); ChangeSize (pWnd, cx, cy ); GetClientRect (& m_rect); // set the size of the changed dialog box to the old size. } |