Condividi tramite


IVsPropertyPage.CategoryTitle(UInt32, String) Method

Definition

Returns the category under which your property pages should be displayed in the tree view.

public:
 int CategoryTitle(System::UInt32 iLevel, [Runtime::InteropServices::Out] System::String ^ % pbstrCategory);
int CategoryTitle(unsigned int iLevel, [Runtime::InteropServices::Out] std::wstring const & & pbstrCategory);
public int CategoryTitle (uint iLevel, out string pbstrCategory);
abstract member CategoryTitle : uint32 * string -> int
Public Function CategoryTitle (iLevel As UInteger, ByRef pbstrCategory As String) As Integer

Parameters

iLevel
UInt32

[in] Integer containing the level.

pbstrCategory
String

[out, retval] Pointer to the category (folder) under which you want your property page to be displayed.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsPropertyPage::CategoryTitle(  
   [in]UINT iLevel,  
   [out, retval]BSTR *pbstrCategory  
);  

If your property page does not have a category and you would prefer it to show on the top level of the tree view directly under the appropriate top-level category, then either implement IPropertyPage alone, or return E_NOTIMPL from this method.

  1. Otherwise, the environment first calls this method with an iLevel value of zero.

  2. You can then return the name of the category that should be the closest direct ancestor of this page in the tree.

  3. The environment will then call you with an iLevel value of one.

  4. If you want your page to be indented one level, then return S_FALSE.

  5. The environment continues to call this method, increasing the value of iLevel by one each time, until you return something other than S_OK, or you reach the environment's internal limit of what it supports.

Returning E_NOTIMPL and S_FALSE stops processing without showing an error to the user. Any value other than S_OK can cause error information to be shown to the user.

Currently the environment only supports two levels of categories:

CatLevel1

CatLevel0

PageName

The Visual Studio categories, Common Properties and Configuration Properties, are above CatLevel1 in the hierarchy. The Visual Studio categories do not count as part of the two levels. You do not return them from get_CategoryTitle.

Applies to