현재 선택된 아이템 인덱스 및 텍스트 얻기 - GetCurSel(), GetLBText()
CComboBox m_ComboStartEvt;
int nIndex = m_ComboStartEvt.GetCurSel();
if (CB_ERR == nIndex)
{
m_DateTimeStartDate.EnableWindow(FALSE);
return;
}
CString sStartEvt = _T("");
m_ComboStartEvt.GetLBText(nIndex, sStartEvt);
BOOL bRetVal = FALSE;
CString sTemp = _T("");
bRetVal = sTemp.LoadString(IDS_FILTERDLG_STARTEVT);
if (0 != sTemp.CompareNoCase(sStartEvt))
m_DateTimeStartDate.EnableWindow();
else
m_DateTimeStartDate.EnableWindow(FALSE);
CComboBox m_ComboStartEvt;
int nIndex = m_ComboStartEvt.GetCurSel();
if (CB_ERR == nIndex)
{
m_DateTimeStartDate.EnableWindow(FALSE);
return;
}
CString sStartEvt = _T("");
m_ComboStartEvt.GetLBText(nIndex, sStartEvt);
BOOL bRetVal = FALSE;
CString sTemp = _T("");
bRetVal = sTemp.LoadString(IDS_FILTERDLG_STARTEVT);
if (0 != sTemp.CompareNoCase(sStartEvt))
m_DateTimeStartDate.EnableWindow();
else
m_DateTimeStartDate.EnableWindow(FALSE);