SEC_TREECLASS::InsertColumn

Inserts a column in the tree control.

Defined in: trcore.inl

Syntax

InsertColumn(int nCol, const CString& strHeader, int fmt, int widthCol, int iSubItem, int iImage, BOOL bUpdate)

Return Value

Nonzero if successful; otherwise 0.

Parameters

nCol

The index of the new column.

strHeader

Refernce to a string containing the column’s header.

fmt

Integer specifying the alignment of the column. It can be one of these values: LVCFMT_LEFT, LVCFMT_RIGHT, or LVCFMT_CENTER. Default is LVCFMT_LEFT.

widthCol

Width of the column, in pixels. If this parameter is -1, the column width is not set.

iSubItem

Index of the subitem associated with the column. If this parameter is -1, no subitem is associated with the column.

iImage

Zero-based index of the column header image. When using header images the LVCFMT_BITMAP_ON_RIGHT can be specified to display the image to the right of text.

bUpdate

If TRUE and redraw after insert is enabled, the control will be invalidated.