Udostępnij za pośrednictwem


CMFCTasksPane::AddLabel

Adds a label to the specified task group.

int AddLabel(
    int nGroup,
    LPCTSTR lpszLabelName,
    int nTaskIcon = -1,
    BOOL bIsBold = FALSE
);

Parameters

  • [in] nGroup
    Specifies the index of the group where the label is added.

  • [in] lpszLabelName
    Specifies the name of the label.

  • [in] nTaskIcon
    Specifies the icon to display next to the label. The framework stores icons in a list of images. This parameter is an index into that list.

  • [in] bIsBold
    TRUE to display the label in bold text; otherwise, FALSE.

Return Value

The zero-based index of the group where the label was added, or -1 if the group specified by nGroup does not exist.

Remarks

The framework handles tasks and labels differently. When a user clicks on a task, the framework executes a command. When a user clicks on a label, no command is executed. For more information, see CMFCTasksPane::AddTask.

Requirements

Header: afxTasksPane.h

See Also

Reference

CMFCTasksPane Class

Hierarchy Chart