Share via


CListCtrl::Arrange

Repositions items in an icon view so that they align on a grid.

BOOL Arrange( 
   UINT nCode  
);

Parameters

  • nCode
    Specifies the alignment style for the items. It can be one of the following values:

    • LVA_ALIGNLEFT   Aligns items along the left edge of the window.

    • LVA_ALIGNTOP   Aligns items along the top edge of the window.

    • LVA_DEFAULT   Aligns items according to the list view's current alignment styles (the default value).

    • LVA_SNAPTOGRID   Snaps all icons to the nearest grid position.

Return Value

Nonzero if successful; otherwise zero.

Remarks

The nCode parameter specifies the alignment style.

Example

// Align all of the list view control items along the top 
    // of the window (the list view control must be in icon or 
    // small icon mode).
    m_myListCtrl.Arrange(LVA_ALIGNTOP);

Requirements

Header: afxcmn.h

See Also

Reference

CListCtrl Class

Hierarchy Chart

CListCtrl::EnsureVisible