CListBox::GetSelItems
다중 선택 목록 상자에서 선택한 항목의 항목 번호를 지정 하는 정수 배열 버퍼를 채웁니다.
int GetSelItems(
int nMaxItems,
LPINT rgIndex
) const;
매개 변수
nMaxItems
버퍼에 넣을 항목 숫자는 선택된 된 항목의 최대 수를 지정 합니다.rgIndex
수를 지정 하는 정수에 대해 충분히 큰 버퍼에 대 한 포인터를 지정 합니다. nMaxItems.
반환 값
항목의 실제 번호를 버퍼에 배치 합니다.목록 상자가 단일 선택 목록 상자 반환 값 이면 LB_ERR.
예제
// Get the indexes of all the selected items.
int nCount = m_myODListBox.GetSelCount();
CArray<int,int> aryListBoxSel;
aryListBoxSel.SetSize(nCount);
m_myODListBox.GetSelItems(nCount, aryListBoxSel.GetData());
// Dump the selection array.
AFXDUMP(aryListBoxSel);
요구 사항
헤더: afxwin.h