Help Center

CListBox.GetCountmethod

Gets the number of items in a list box.

WindowsmethodCListBox.incdocumented

Syntax

FUNCTION GetCount (BYVAL hListBox AS HWND) AS LONG

Return value

The return value is the number of items in the list box, or LB_ERR if an error occurs.

Description

Gets the number of items in a list box.

Remarks

The returned count is one greater than the index value of the last item (the index is zero-based).

Example

DIM count AS LONG = CListBox.GetCount(hListBox)

Reference

  • Include file CListBox.inc
  • Defined in AfxNova/CListBox.inc:214
  • Documented in Windows/WIndows Controls/CListBox Class.md
  • Topic: CListBox Class