CComboBox::SetTopIndex
특정 항목을 콤보 상자의 목록 상자 부분에 표시 됩니다.
int SetTopIndex(
int nIndex
);
매개 변수
- nIndex
목록 상자 항목의 인덱스를 지정합니다.
반환 값
성공 하면 0 또는 CB_ERR 오류가 발생 합니다.
설명
목록 상자에서 지정 된 항목까지 스크롤 하는 시스템 nIndex 표시 목록 위쪽 상자 또는 최대 스크롤 범위에 도달 했습니다.
예제
// Set the first visible item in the combo box to be the middle item
m_pComboBox->SetTopIndex(m_pComboBox->GetCount() / 2);
요구 사항
헤더: afxwin.h