Expand Minimize
This topic has not yet been rated - Rate this topic

CListCtrl::SetIconSpacing

Sets the spacing between icons in a list view control.

CSize SetIconSpacing( 
   int cx, 
   int cy  
); 
CSize SetIconSpacing( 
   CSize size  
);
cx

The distance (in pixels) between icons on the x-axis.

cy

The distance (in pixels) between icons on the y-axis.

size

A CSize object specifying the distance (in pixels) between icons on the x- and y-axes.

A CSize object containing the previous values for icon spacing.

This member function implements the behavior of the Win32 macro, ListView_SetIconSpacing, as described in the Windows SDK.

	// Leave lots of space between icons.
	m_myListCtrl.SetIconSpacing(CSize(100, 100));

Header: afxcmn.h

Did you find this helpful?
(1500 characters remaining)
© 2013 Microsoft. All rights reserved.