BCGControlBar Pro for MFC
int CBCGPTasksPane::AddTask ( int  nGroup,
LPCTSTR  lpszTaskName,
int  nTaskIcon = -1,
UINT  uiCommandID = 0,
DWORD_PTR  dwUserData = 0 
)

Adds a new task into the specified task group.

Returns
The zero-based index in the internal group list if the function succeeds; it's -1 if the specifies by nGroup group does not exist.

Use this function to add a new task into a group. The returned index should be used for the consequent task operations.

Parameters
nGroupThe group index.
lpszTaskNameThe task name.
nTaskIconIndex in the internal image list of the task icon.
uiCommandIDSpecifies the ID of a command to be executed when the user clicks the task. The task is treated as a label if uiCommandID is 0.
dwUserDataUser-defined data to be associated with the added task.