SEC_LISTCLASS::InsertColumn
Inserts a column in the list view control.
Defined in: slstcore.inl
Syntax
InsertColumn( int nCol, Column* pColNew, BOOL bUpdate)
InsertColumn(int nCol, const CString& strHeader, int fmt, int widthCol, int iSubItem, BOOL bUpdate)
InsertColumn( int nCol, const LV_COLUMN* lvc, BOOL bUpdate )
Return Value
Nonzero if successful; otherwise 0.
Parameters
nCol
The index of the new column.
pColNew
Address of a Column structure that contains the attributes of the new column.
bUpdate
If TRUE and redraw after insert is enabled, the control will be invalidated.
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.
lvc
Address of an LV_COLUMN structure that contains the attributes of the new column.