| | |
| | | return m_nPanelWidth; |
| | | } |
| | | |
| | | void CPanelMaster::setPanelWidth(int width) |
| | | { |
| | | m_nPanelWidth = width; |
| | | } |
| | | |
| | | BOOL CPanelMaster::OnInitDialog() |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | |
| | | pLine1->SetBkgndColor(RGB(225, 225, 225)); |
| | | pLine1->SetLineColor(RGB(198, 198, 198)); |
| | | pLine1->EnableResize(); |
| | | |
| | | |
| | | // 读取面板宽 |
| | | CString strIniFile; |
| | | strIniFile.Format(_T("%s\\%s.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir, (LPTSTR)(LPCTSTR)theApp.m_strAppFile); |
| | | m_nPanelWidth = GetPrivateProfileInt(_T("App"), _T("MasterPanelWidth"), |
| | | int((double)GetSystemMetrics(SM_CXSCREEN) * 0.25), (LPTSTR)(LPCTSTR)strIniFile); |
| | | |
| | | |
| | | // treectrl |
| | |
| | | m_nPanelWidth = max(m_nPanelWidth, MASTER_PANEL_MIN_WIDTH); |
| | | m_nPanelWidth = min(m_nPanelWidth, MASTER_PANEL_MAX_WIDTH); |
| | | GetParent()->SendMessage(ID_MSG_PANEL_RESIZE, m_nPanelWidth, 0); |
| | | |
| | | CString strIniFile, strValue; |
| | | strIniFile.Format(_T("%s\\%s.ini"), (LPTSTR)(LPCTSTR)theApp.m_strAppDir, (LPTSTR)(LPCTSTR)theApp.m_strAppFile); |
| | | strValue.Format(_T("%d"), m_nPanelWidth); |
| | | WritePrivateProfileString(_T("App"), _T("MasterPanelWidth"), |
| | | (LPTSTR)(LPCTSTR)strValue, (LPTSTR)(LPCTSTR)strIniFile); |
| | | OnSize(0, 0, 0); |
| | | |
| | | * result = 0; |