CComboBox::SetMinVisibleItems

최소 항목 수를 표시 드롭다운 목록에서 현재 콤보 상자 컨트롤을 설정합니다.

BOOL SetMinVisibleItems(
     int iMinVisible
);

매개 변수

Parameter

설명

[in] iMinVisible

표시 된 항목의 최소 수를 지정합니다.

반환 값

true이 방법에 성공 하면. 그렇지 않으면 false.

요구 사항

헤더: afxwin.h

이 메서드는 Windows xp에서 및 나중에 지원 됩니다.

이 메서드에 대 한 추가 요구 사항에서 설명 Windows Vista 공용 컨트롤의 빌드 요구 사항.

설명

보내는이 메서드는 CB_SETMINVISIBLE 에서 설명 하는 메시지는 Windows SDK.

예제

다음 코드 예제에서는 변수를 정의 m_combobox즉, 콤보 상자 컨트롤을 프로그래밍 방식으로 액세스 하는 데 사용 합니다. 이 변수는 다음 예제에 사용 됩니다.

   // Variable to access the combo box control
    CComboBox m_combobox;

다음 코드 예제에서는 20 항목을 콤보 상자 컨트롤의 드롭다운 목록에 삽입합니다. 그런 다음 드롭다운 화살표를 누를 때 최소 10 개 항목을 표시 하도록 지정 합니다.

 // Add extra initialization here. 

    // Add 20 items to the combo box. The Resource Editor 
    // has already been used to set the style of the combo 
    // box to CBS_SORT.
    CString str;
    for (int i = 1; i <= 20; i++)
    {
        str.Format(_T("Item %2d"), i); 
        m_combobox.AddString(str);
    }
    // Set the minimum visible item
    m_combobox.SetMinVisibleItems( 10 );
    // Set the cue banner
    m_combobox.SetCueBanner(_T("Select an item..."));

    // End of extra initialization.

참고 항목

참조

CComboBox 클래스

계층 구조 차트

CComboBox::GetMinVisible

CComboBox::ShowDropDown

CB_SETMINVISIBLE