IT/C#

[C#] Combobox사용법

데브렉스 2011. 1. 11. 06:46
반응형

BOOL CTestDlg::OnInitDialog()
{
    CDialog::OnInitDialog();
     // TODO: Add extra initialization here
    this->m_ctrCombo1.ResetContent(); //콤보박스내의 모든 문자열 삭제    this->m_ctrCombo1.AddString(_T("ABCD"));  //문자열을 추가
    this->m_ctrCombo1.AddString(_T("1234"));    //문자열을 추가
    this->m_ctrCombo1.AddString(_T("5678"));    //문자열을 추가
    this->m_ctrCombo1.DeleteString(0);    //첫번째 문자열(ABCD)을 삭제
    this->m_ctrCombo1.SetCurSel(0);       //첫번째 문자열(1234)을 선택
    this->m_ctrCombo1.InsertString(0,"Insert"); //0번문자열(1234) 앞에 새로운문자열 삽입

 

    return TRUE;  // return TRUE unless you set the focus to a control
               // EXCEPTION: OCX Property Pages should return FALSE
}

 

▷ CComboBox::AddString - 스트링을 더함.
▷ CComboBox::CComboBox - ComboBox 오브젝트를 생성(구성).
▷ CComboBox::Clear -현재 선택을 지움.
▷ CComboBox::CompareItem - 새로운 리스트 항목의 상태적 위치를 결정.
▷ CComboBox::Copy - 현재 선택을 Copy.
▷ CComboBox::Create - CComboBox를 생성.
▷ CComboBox::Cut - 제거된 텍스트를 복사.
▷ CComboBox::DeleteItem - 항목이 Combo 박스에서 제거.
▷ CComboBox::DeleteString - 스트링을 제거.
▷ CComboBox::Dir - 리스트를 더함.
▷ CComboBox::DrawItem - 양상이 변할 때 불려짐.
▷ CComboBox::FindString - 첫 번째 스트링을 찾음.
▷ CComboBox::FindStringExact - 첫 번째 리스트 박스 스트링을 찾음.
▷ CComboBox::GetCount - 항목의 수를 회복.
▷ CComboBox::GetCurSel - 현재 선택된 항목의 색인을 찾음
▷ CComboBox::GetDroppedControlRect - 스크린 좌표를 되찾음.
▷ CComboBox::GetDroppedState - 리스트 박스가 보일지를 결정.
▷ CComboBox::GetEditSel - 시작과 끝나는 문자의 위치를 얻음.
▷ CComboBox::GetExtendedUI - 디폴트, 확장 사용자 인터페이스의 결정.
▷ CComboBox::GetItemData - 항목과 관련된 비트값을 회복.
▷ CComboBox::GetItemDataPtr - 포인터로서 관련된 비트 값을 회복.
▷ CComboBox::GetItemHeight - 리스트 항목의 높이를 회복.

▷ CComboBox::GetLBText - 리스트 박스로부터 스트링을 얻음.


▷ CComboBox::GetLBTextLen - 스트링의 길이를 지정.
▷ CComboBox::InsertString - 스트링의 삽입.
▷ CComboBox::LimitText - 텍스트의 길이를 제한.
▷ CComboBox::MeasureItem - Combo 박스 치수를 결정하기 위해 불려짐.
▷ CComboBox::Paste - 현재 커서 위치에서 편집 제어로 삽입.
▷ CComboBox::ResetContent - 모든 항목의 제거.
▷ CComboBox::SelectString - 스트링을 선택, 복사.
▷ CComboBox::SetCurSel - 스트링을 선택.
▷ CComboBox::SetEditSel - 편집 제어에서 문자들을 선택.
▷ CComboBox::SetExtendedUI - 디폴트, 확장 사용자 인터페이스의 선택.
▷ CComboBox::SetItemData - 항목과 관련된 값을 정함.
▷ CComboBox::SetItemDataPtr - 포인터에 대한 관련된 값을 정함.
▷ CComboBox::SetItemHeight - 높이를 지정.
▷ CComboBox::ShowDropDown - 리스트 박스를 보여주거나 숨김.

반응형