CListCtrl::GetColumnWidth

 

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


      int GetColumnWidth(
   int nCol 
) const;

nCol

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

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

Show: