ON_CBN_SELENDCANCEL(IDC_PATH0_COMBO, UpdateButtonStates)
ON_CBN_SELENDCANCEL(IDC_PATH1_COMBO, UpdateButtonStates)
ON_CBN_SELENDCANCEL(IDC_PATH2_COMBO, UpdateButtonStates)
+ ON_NOTIFY_RANGE(CBEN_BEGINEDIT, IDC_PATH0_COMBO, IDC_PATH2_COMBO, OnSetfocusPathCombo)
ON_WM_TIMER()
ON_BN_CLICKED(IDC_SELECT_FILTER, OnSelectFilter)
ON_WM_ACTIVATE()
, m_pUpdateButtonStatusThread(NULL)
, m_bRecurse(FALSE)
{
+ m_bAutoCompleteReady[0] = false;
+ m_bAutoCompleteReady[1] = false;
+ m_bAutoCompleteReady[2] = false;
memset(m_dwFlags, 0, sizeof(m_dwFlags));
}
bDoUpdateData = FALSE;
}
UpdateData(bDoUpdateData);
-
- int nSource = GetOptionsMgr()->GetInt(OPT_AUTO_COMPLETE_SOURCE);
- if (nSource > 0)
- {
- m_ctlPath[0].SetAutoComplete(nSource);
- m_ctlPath[1].SetAutoComplete(nSource);
- m_ctlPath[2].SetAutoComplete(nSource);
- }
String filterNameOrMask = theApp.m_pGlobalFileFilter->GetFilterNameOrMask();
BOOL bMask = theApp.m_pGlobalFileFilter->IsUsingMask();
OnSelchangeCombo(2);
}
+void COpenView::OnSetfocusPathCombo(UINT id, NMHDR *pNMHDR, LRESULT *pResult)
+{
+ if (!m_bAutoCompleteReady[id - IDC_PATH0_COMBO])
+ {
+ int nSource = GetOptionsMgr()->GetInt(OPT_AUTO_COMPLETE_SOURCE);
+ if (nSource > 0)
+ m_ctlPath[id - IDC_PATH0_COMBO].SetAutoComplete(nSource);
+ m_bAutoCompleteReady[id - IDC_PATH0_COMBO] = true;
+ }
+ *pResult = 0;
+}
+
/**
* @brief Called every time paths are edited.
*/
CSize m_sizeOrig;
prdlg::CMoveConstraint m_constraint;
CFont m_fontSwapButton;
-
+ bool m_bAutoCompleteReady[3];
// Overrides
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
afx_msg void OnSelchangePath0Combo();
afx_msg void OnSelchangePath1Combo();
afx_msg void OnSelchangePath2Combo();
+ afx_msg void OnSetfocusPathCombo(UINT id, NMHDR *pNMHDR, LRESULT *pResult);
template<int id1, int id2>
afx_msg void OnSwapButton();
afx_msg void OnEditEvent();