m_ctlPath[0].AttachSystemImageList();
m_ctlPath[1].AttachSystemImageList();
m_ctlPath[2].AttachSystemImageList();
- m_ctlPath[0].LoadState(_T("Files\\Left"));
- m_ctlPath[1].LoadState(_T("Files\\Right"));
- m_ctlPath[2].LoadState(_T("Files\\Option"));
- m_ctlExt.LoadState(_T("Files\\Ext"));
-
- BOOL bIsEmptyThirdItem = theApp.GetProfileInt(_T("Files\\Option"), _T("Empty"), TRUE);
- if (bIsEmptyThirdItem)
- m_ctlPath[2].SetWindowText(_T(""));
-
+ LoadComboboxStates();
+
BOOL bDoUpdateData = TRUE;
for (int index = 0; index < countof(m_strPath); index++)
{
SaveComboboxStates();
theApp.WriteProfileInt(_T("Settings"), _T("Recurse"), m_bRecurse);
+ LoadComboboxStates();
COpenDoc *pDoc = GetDocument();
pDoc->m_files = m_files;
}
/**
+ * @brief Load File- and filter-combobox states.
+ */
+void COpenView::LoadComboboxStates()
+{
+ m_ctlPath[0].CComboBox::ResetContent();
+ m_ctlPath[1].CComboBox::ResetContent();
+ m_ctlPath[2].CComboBox::ResetContent();
+
+ m_ctlPath[0].LoadState(_T("Files\\Left"));
+ m_ctlPath[1].LoadState(_T("Files\\Right"));
+ m_ctlPath[2].LoadState(_T("Files\\Option"));
+ m_ctlExt.LoadState(_T("Files\\Ext"));
+
+ BOOL bIsEmptyThirdItem = theApp.GetProfileInt(_T("Files\\Option"), _T("Empty"), TRUE);
+ if (bIsEmptyThirdItem)
+ m_ctlPath[2].SetWindowText(_T(""));
+}
+
+/**
* @brief Save File- and filter-combobox states.
*/
void COpenView::SaveComboboxStates()
void TrimPaths();
void OnButton(int index);
void OnSelchangeCombo(int index);
+ void LoadComboboxStates();
+ void SaveComboboxStates();
// Generated message map functions
protected:
afx_msg void OnPath2Button();
afx_msg void OnOK();
afx_msg void OnCancel();
- afx_msg void SaveComboboxStates();
afx_msg void OnSelchangePath0Combo();
afx_msg void OnSelchangePath1Combo();
afx_msg void OnSelchangePath2Combo();