An application sends a CB_GETCOUNT message to retrieve the number of items in the list box of a combo box.
CB_GETCOUNT wParam = 0; // not used; must be zero lParam = 0; // not used; must be zero
This message has no parameters.
The return value is the number of items in the list box. If an error occurs, it is CB_ERR.
The index is zero-based, so the returned count is one greater than the index value of the last item.