ListView_SetIconSpacingListView_SetIconSpacing*
*Contents  *Index  *Topic Contents
*Previous Topic: ListView_SetHoverTime
*Next Topic: ListView_SetImageList

ListView_SetIconSpacing


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

Sets the spacing between icons in list view controls set to the LVS_ICON style. You can use this macro or send the LVM_SETICONSPACING message explicitly.

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.

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.

Version 4.70


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.