ListBox_SetTopIndex macro

Ensures that the specified item in a list box is visible. You can use this macro or send the LB_SETTOPINDEX message explicitly.

Syntax


int ListBox_SetTopIndex(
   HWND hwndCtl,
   int  index
);

Parameters

hwndCtl

Type: HWND

A handle to the control.

index

Type: int

The zero-based index of the item to put at the top of the visible part of the list.

Return value

If an error occurs, the return value is LB_ERR.

Remarks

The list box contents are scrolled so that either the specified item appears at the top of the list box or the maximum scroll range has been reached.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Windowsx.h

 

 

Show: