Share via


LVM_SETICONSPACING

This message sets the spacing between icons in list-view controls that have the LVS_ICON style.

LVS_SETICONSPACING wParam = 0; 
  lParam = (LPARAM) MAKELONG(cx, cy);

Parameters

  • cx
    Distance, in pixels, to set between icons on the x-axis. Setting this value to –1 resets the cx parameter to default spacing.
  • cy
    Distance, in pixels, to set between icons on the y-axis. Setting this value to –1 resets the cy parameter to default spacing.

Return Values

Returns a DWORD value that contains the previous cx in the low-order word, and the previous cy in the high-order word.

Remarks

Values for cx and cy are relative to the upper-left corner of an icon bitmap. Therefore, to set spacing between icons that do not overlap, the cx or cy values must include the size of the icon, plus the amount of empty space desired between icons. Values that do not include the width of the icon will result in overlaps.

Related macro:ListView_SetIconSpacing

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Commctrl.h.

See Also

ListView_SetIconSpacing | List-View Controls Messages

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.