Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

LVM_SETICONSPACING message

Sets the spacing between icons in list-view controls that have the LVS_ICON style. You can send this message explicitly or by using the ListView_SetIconSpacing macro.

Parameters

wParam

Must be zero.

lParam

The LOWORD specifies the distance, in pixels, to set between icons on the x-axis. The HIWORD specifies the distance, in pixels, to set between icons on the y-axis. See Remarks.

Return value

Returns a DWORD value that contains the previous x-axis distance in the low word, and the previous y-axis distance in the high word.

Remarks

Values for lParam are relative to the upper-left corner of an icon bitmap. Therefore, to set spacing between icons that do not overlap, the lParam 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.

When defining the icon spacing, the lParam values must set to 4 or larger. Smaller values will not yield the desired layout. To reset the icons to the default spacing, set the lParam values to -1.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Commctrl.h

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.