다음을 통해 공유


CMFCRibbonComboBox 클래스

CMFCRibbonComboBox 리본 표시줄, 리본 패널 또는 리본 팝업 메뉴에 추가할 수 있는 콤보 상자 컨트롤 클래스를 구현 합니다.

class CMFCRibbonComboBox : public CMFCRibbonEdit

Members

Bb983816.collapse_all(ko-kr,VS.110).gif생성자

Name

설명

CMFCRibbonComboBox::CMFCRibbonComboBox

CMFCRibbonComboBox 개체를 만듭니다.

Bb983816.collapse_all(ko-kr,VS.110).gifPublic 메서드

Name

설명

CMFCRibbonComboBox::AddItem

고유 항목을 목록 상자에 추가합니다.

CMFCRibbonComboBox::DeleteItem

목록 상자에서 지정 된 항목을 삭제합니다.

CMFCRibbonComboBox::EnableDropDownListResize

그 떨어지면 목록 상자의 크기를 변경할 수 있는지 여부를 지정 합니다.

CMFCRibbonComboBox::FindItem

목록 상자에는 지정 된 문자열과 일치 하는 첫 번째 항목의 인덱스를 반환 합니다.

CMFCRibbonComboBox::GetCount

목록 상자에서 항목 수를 반환합니다.

CMFCRibbonComboBox::GetCurSel

목록 상자에서 현재 선택한 항목의 인덱스를 가져옵니다.

CMFCRibbonComboBox::GetDropDownHeight

목록 상자를 놓을 때 목록 상자의 높이를 가져옵니다.

CMFCRibbonComboBox::GetIntermediateSize

콤보 상자의 크기를 중간 모드에 표시 된 대로 반환 합니다.

CMFCRibbonComboBox::GetItem

항목 목록 상자에서 지정 된 인덱스와 연결 된 문자열을 반환 합니다.

CMFCRibbonComboBox::GetItemData

목록 상자에서 지정 된 인덱스의 항목에 연결 된 데이터를 반환 합니다.

CMFCRibbonComboBox::HasEditBox

편집 상자 컨트롤에 있는지 여부를 나타냅니다.

CMFCRibbonComboBox::IsResizeDropDownList

목록 상자의 크기를 조정할 수 있는지 여부를 나타냅니다.

CMFCRibbonComboBox::OnSelectItem

사용자 목록 상자에서 항목을 선택 하면 프레임 워크에서 호출 됩니다.

CMFCRibbonComboBox::RemoveAllItems

목록 상자에서 모든 항목을 삭제 하 고 편집 상자를 지웁니다.

CMFCRibbonComboBox::SelectItem

목록 상자에서 항목을 선택합니다.

CMFCRibbonComboBox::SetDropDownHeight

삭제 하면 목록 상자의 높이를 설정 합니다.

설명

리본 콤보 상자 목록 상자는 정적 레이블 또는 레이블 사용자가 편집할 수와 함께 구성 됩니다.리본 콤보 상자를 만들 때 원하는 형식을 지정 해야 합니다.

예제

다음 예제에서는 개체를 생성 하는 방법을 보여 줍니다.을 CMFCRibbonComboBox 클래스, 콤보 상자에 항목을 추가, 콤보 상자에서 항목을 선택 하 고 패널에 콤보 상자를 추가 합니다.

    // Create a simple combo box with two entries:
    // The first parameter is the id of the combo box.
    // The third parameter is the width of the combo box in pixels.
    // The fourth parameter is the display label of the combo box.
    // The fifth parameter is the index of the small image of the combo box.
    CMFCRibbonComboBox *pComboSimple = new CMFCRibbonComboBox(-1, FALSE, -1, 0, -1);

    // Add two items to the combo box and select the first item in the list:
    pComboSimple->AddItem(_T("Hi!"));
    pComboSimple->AddItem(_T("Hello!"));
    pComboSimple->SelectItem(0);

    // Add combo button to "Favorites" panel:
    // CMFCRibbonPanel* pPanelFavorites
    pPanelFavorites->Add(pComboSimple);

상속 계층 구조

CObject

   CMFCRibbonBaseElement

      CMFCRibbonButton

         CMFCRibbonEdit

            CMFCRibbonComboBox

요구 사항

헤더: afxribboncombobox.h

참고 항목

참조

계층 구조 차트

CMFCRibbonEdit 클래스

기타 리소스

MFC 클래스