다음을 통해 공유


CListCtrl::SetColumnWidth

Changes the width of a column in report view or list view.

BOOL SetColumnWidth(
   int nCol,
   int cx 
);

Parameters

  • nCol
    Index of the column for which the width is to be set. In list view, this parameter must be 0.

  • cx
    The new width of the column. Can be either LVSCW_AUTOSIZE or LVSCW_AUTOSIZE_USEHEADER, as described in LVM_SETCOLUMNWIDTH in the Windows SDK.

Return Value

Nonzero if successful; otherwise zero.

Requirements

Header: afxcmn.h

See Also

Reference

CListCtrl Class

Hierarchy Chart

CListCtrl::GetColumnWidth

CListCtrl::GetStringWidth

Other Resources

CListCtrl Members