Platform SDK: Management Console |
The IHeaderCtrl2::InsertColumn method 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 );
Value | Meaning |
---|---|
LVCFMT_LEFT | Text is left-aligned. |
LVCFMT_CENTER | Text is center-aligned. |
LVCFMT_RIGHT | Text is right-aligned. |
Value | Meaning |
---|---|
MMCLV_AUTO | MMC automatically determines the width of the column based on its title string. |
HIDE_COLUMN | Introduced in MMC 1.2. The column is inserted, but it is hidden. Note that the user can make the column visible when customizing a list view.
For snap-ins built with the MMC 1.2 SDK, but which are loaded in an older version of MMC, HIDE_COLUMN is interpreted as a zero width. The user can widen the column by dragging it with the mouse. |
MMC does not persist in memory any changes made to a column set due to the action of IHeaderCtrl2::InsertColumn, so snap-ins are solely responsible for updating persisted column configuration data after inserting columns into a column set. See IHeaderCtrl2 and Column Persistence for more information.
Calls to InsertColumn fail if any items have already been inserted into the result view.
Version: Requires MMC 1.2 (with Internet Explorer 5 or later). Included with Windows 2000 or available as a redistributable for Windows 95/98 and Windows NT 4.0 SP4.
Header: Declared in Mmc.h.
Library: Use Mmc.lib.