Udostępnij za pośrednictwem


CListCtrl::GetColumnWidth

Pobiera szerokość kolumny w widoku raportu lub listy.

int GetColumnWidth(
   int nCol 
) const;

Parametry

  • nCol
    Określa indeks kolumny, którego szerokość ma być pobrana.

Wartość zwracana

Szerokość w pikselach kolumny określonej przez nCol.

Przykład

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

Wymagania

Nagłówek: afxcmn.h

Zobacz też

Informacje

Klasa CListCtrl

Wykres hierarchii

CListCtrl::SetColumnWidth

CListCtrl::GetColumn