CTreePropertySheet::AddPage

CTreePropertySheet::AddPage( const CString& sCaption,
int nType = tps_item_node,
UINT nIDTemplate = ((UINT)-1),
const CString& sCaptionDescr = CString(""),
CDialog *pDlg = NULL);

Parameters

sCaption The caption of this item. Appears in the tree control and as main dialog caption (if pWnd!=NULL)
nType The type of this item. Can be one of these values:
tps_item_branch This item has sub-items. All following items are one level below this item, until a 'tps_item_endbranch' is found.
tps_item_node This item is a simple node in the tree.
tps_item_endbranch This item is the last item of the current sub-branch(which was initiated with an tps_item_branch). All following items are on the same level as the corresponding 'tps_item_branch' entry.
nIDTemplate Contains the ID number of a dialog-box template resource.
sCaptionDescr Defines an additional description to the main caption of this item. This is only shown if the dialog belonging to this item is currently selected.
pDlg Contains a CDialog derivated class for this dialog, for example to do the DDX/DDV handling.
If NULL, a standard CDialog is used.

Remarks

Call this function to add dialog pages to the CTreePropertySheet.
The nType parameter specifies how to insert the page into the tree. Consider this example:

(tree control contents) (code)
+ Main preferences AddPage("Main preferences",tps_item_branch);
    - Directories AddPage("Directories",tps_item_node);
    - User information AddPage("User information",tps_item_node);
    - Plugins AddPage("Plugins",tps_item_endbranch);
- Security AddPage("Security",tps_item_node);