IPropertySheetCallback::AddPage method (mmc.h)
The IPropertySheetCallback::AddPage method enables a snap-in to add a page to a property sheet.
Syntax
HRESULT AddPage(
[in] HPROPSHEETPAGE hPage
);
Parameters
[in] hPage
A value that specifies the handle to the page to be added. The hPage parameter is a handle to a PROPSHEETPAGE structure created by the Windows API CreatePropertySheetPage.
Return value
This method can return one of these values.
Remarks
The snap-in cannot call AddPage from within a property page handler because the property page is created and runs on a secondary thread. A snap-in cannot call an MMC interface from a different thread than the one in which the snap-in was created. The correct place to call AddPage is in the snap-in's implementation of the IExtendPropertySheet2::CreatePropertyPages method.
If a snap-in uses the IPropertySheetProvider interface directly, it can use AddPage to add the primary pages and then call IPropertySheetProvider::AddPrimaryPages (NULL, FALSE, NULL, [TRUE or FALSE]) so that the provider will add these pages to the property sheet. For more information about how to create your property pages in the snap-in's implementation of IExtendPropertySheet2::CreatePropertyPages, see IPropertySheetProvider::AddPrimaryPages.
Pages are added to the sheet in the order in which they are presented. The primary snap-in's pages are always added first.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista |
Minimum supported server | Windows Server 2008 |
Target Platform | Windows |
Header | mmc.h |
DLL | Mmcndmgr.dll |