CB_GETCOUNT
wParam = 0; /* not used, must be zero */
lParam = 0L; /* not used, must be zero */
An application sends a CB_GETCOUNT message to retrieve the number of items in the list box of a combo box.
This message has no parameters.
The return value is the number of items in the list box.
The returned count is one greater than the index value of the last item (the index is zero-based).
This example retrieves the number of items in a combo box:
WORD cListItems;
cListItems = (WORD) SendDlgItemMessage(hdlg, ID_MYCOMBOBOX,
CB_GETCOUNT, 0, 0);