Share via


ListView_SetIconSpacing

This macro sets the spacing between icons in list view controls set to the LVS_ICON style.

DWORD ListView_SetIconSpacing(
HWND hwndLV, 
int cx, 
int cy );

Parameters

  • hwndLV
    Handle to a list view control.
  • cx
    Distance, in pixels, to set between icons on the x-axis.
  • cy
    Distance, in pixels, to set between icons on the y-axis.

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

The cx and cy parameters 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 message: LVM_SETICONSPACING

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Commctrl.h    

Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.

 Last updated on Tuesday, July 13, 2004

© 1992-2000 Microsoft Corporation. All rights reserved.