Partager via


CMFCTasksPane::AddWindow

Adds a child window to the task pane.

int AddWindow(
    int nGroup,
    HWND hwndTask,
    int nWndHeight,
    BOOL bAutoDestroyWindow = FALSE,
    DWORD dwUserData = 0
);

Parameters

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

  • [in] hwndTask
    Specifies the handle of the window to add.

  • [in] nWndHeight
    Specifies the height of the window.

  • [in] bAutoDestroyWindow
    TRUE to destroy the window when the task is removed; otherwise, FALSE.

  • [in] dwUserData
    Specifies the user-defined data associated with the task.

Return Value

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

Remarks

Call this method to add a control to a task pane. For example, you can add an edit control that functions like a search bar.

Requirements

Header: afxTasksPane.h

See Also

Reference

CMFCTasksPane Class

Hierarchy Chart