BCGControlBar Pro for MFC
int CBCGPTasksPane::AddWindow ( int  nGroup,
HWND  hwndTask,
int  nWndHeight,
BOOL  bAutoDestroyWindow = FALSE,
DWORD_PTR  dwUserData = 0,
CBCGPTask::WindowAlign  align = CBCGPTask::BCGP_TASKPANE_WND_STRETCH,
int  nWndWidth = 0 
)

Adds a child window to the task pane.

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 window as a task. For example, it can be an edit control for search and so on. The returned index should be used for the consequent task operations.

Parameters
nGroupThe group index.
hwndTaskA handle to the window to add.
nWndHeightSpecifies the window height.
bAutoDestroyWindowSpecifies whether the window should be destroyed automatically when the task is removed.
dwUserDataThe user-defined data associated with the task.
alignSpecifies the window alignment.
nWndWidthSpecifies the window width.