GetSelCount
int GetSelCount( )
The count of selected items in a list box. If the list box is a single-selection list box, the return value is LB_ERR.
EX1
#include <..\OriginLab\DialogEx.h> // Dialog class #define IDC_LIST1 1001 void ListBox_GetSelCount(Dialog& MyDlg) { ListBox m_List = MyDlg.GetItem(IDC_LIST1); int nNumsSel = m_List.GetSelCount(); }
Control.h