Partager via


CListCtrl::GetColumnWidth

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

int GetColumnWidth(
   int nCol 
) const;

Parameters

  • nCol
    Specifies the index of the column whose width is to be retrieved.

Return Value

The width, in pixels, of the column specified by nCol.

Example

        // Increase the column width of the second column by 20.
        int nWidth = m_myListCtrl.GetColumnWidth(1);
        m_myListCtrl.SetColumnWidth(1, 20 + nWidth);

Requirements

Header: afxcmn.h

See Also

Reference

CListCtrl Class

Hierarchy Chart

CListCtrl::SetColumnWidth

CListCtrl::GetColumn

Other Resources

CListCtrl Members