IHeaderCtrl::InsertColumn
[This is preliminary documentation and subject to change.]
Adds a column to a default result pane.
HRESULT InsertColumn(
int nCol, // Zero-based index of the column
LPCWSTR title, // Specifies the name of the column
int nFormat, // Specifies justification of text
int nWidth // Specifies the column's initial width
);
Parameters
-
nCol
-
[in] Zero-based index of the column being inserted.
-
title
-
[in] Specifies the string representing the title of the column being inserted.
-
nFormat
-
[in] Specifies the position of text within the column. For column zero nFormat must be LVCFMT_LEFT. This value must be one of the following:
Value |
Meaning |
LVCFMT_LEFT |
Text is left-aligned. |
LVCFMT_CENTER |
Text is center-aligned. |
LVCFMT_RIGHT |
Text is right-aligned. |
-
nWidth
-
[in] Specifies the width of the column in pixels. If you pass the value MMCLV_AUTO, the node manager automatically determines the width of the column based on its title string.
Return Values
-
S_OK
-
The column was successfully inserted.
-
E_UNEXPECTED
-
The current result view is not the console-provided default view.
-
E_INVALIDARG
-
The title parameter is NULL or empty (""), or nCol or nFormat is invalid.
Notes to Callers
Calls to InsertColumn fail if any items have already been inserted into the result view.
See Also
IHeaderCtrl