Export (0) Print
Expand All
MFC
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.

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

// 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);

Community Additions

ADD
Show:
© 2014 Microsoft