Partager via


CMFCPropertySheet::AddPageToTree

Adds a new property page to the tree control.

void AddPageToTree(
   CMFCPropertySheetCategoryInfo* pCategory,
   CMFCPropertyPage* pPage,
   int nIconNum=-1,
   int nSelIconNum=-1 
);

Parameters

  • [in] pCategory
    Pointer to a parent tree node, or NULL to associate the specified page with the top-level node. Call the CMFCPropertySheet::AddTreeCategory method to obtain this pointer.

  • [in] pPage
    Pointer to a property page object.

  • [in] nIconNum
    Zero-based index of an icon, or -1 if no icon is used. The icon is displayed next to the tree control property page when the page is not selected. The default value is -1.

  • [in] nSelIconNum
    Zero-based index of an icon, or -1 if no icon is used. The icon is displayed next to the tree control property page when the page is selected. The default value is -1.

Remarks

This method adds a property page as a leaf of a tree control. To add a property page, create a CMFCPropertySheet object, call the CMFCPropertySheet::SetLook method with the look parameter set to CMFCPropertySheet::PropSheetLook_Tree, and then use this method to add the property page.

Requirements

Header: afxpropertysheet.h

See Also

Reference

CMFCPropertySheet Class

Hierarchy Chart

CMFCPropertySheet::AddTreeCategory