Help Center

CComboEx.GetTopIndexmethod

Retrieves the zero-based index of the first visible item in the list box portion of a combo box.

WindowsmethodCCombo.incdoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

FUNCTION GetTopIndex (BYVAL hCombo AS HWND) AS LONG

Return value

If the message is successful, the return value is the index of the first visible item in the list box of the combo box.

If the message fails, the return value is CB_ERR.

Description

Retrieves the zero-based index of the first visible item in the list box portion of a combo box. Initially, the item with index 0 is at the top of the list box, but if the list box contents have been scrolled, another item may be at the top.

Example

DIM idx AS LONG = CCombo.GetTopIndex(hCombo)

Reference

  • Include file CCombo.inc
  • Documented in Windows/WIndows Controls/CCombo Class.md
  • Topic: CCombo Class