Export (0) Print
Expand All
Expand Minimize

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

// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;

// Double the column width of the first column.
int nWidth = pmyListCtrl->GetColumnWidth(0);
pmyListCtrl->SetColumnWidth(0, 2*nWidth);

See Also

CListCtrl Overview | Class Members | Hierarchy Chart | CListCtrl::SetColumnWidth | CListCtrl::GetColumn

Show:
© 2014 Microsoft