ListView_SetItemPosition macro

Moves an item to a specified position in a list-view control (in icon or small icon view). You can use this macro or send the LVM_SETITEMPOSITION message explicitly.

Syntax


BOOL ListView_SetItemPosition(
   HWND hwnd,
   int  i,
   int  x,
   int  y
);

Parameters

hwnd

Type: HWND

A handle to the list-view control.

i

Type: int

The index of the list-view item.

x

Type: int

The new x-position of the item's upper-left corner, in view coordinates.

y

Type: int

The new y-position of the item's upper-left corner, in view coordinates.

Return value

Returns TRUE if successful, or FALSE otherwise.

Remarks

If the list-view control has the LVS_AUTOARRANGE style, the list-view control is arranged after the position of the item is set.

On Windows Vista, calling this macro on a list-view control with the LVS_AUTOARRANGE style does nothing, and the return value is FALSE.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

 

 

Show: