Share via


MSPropShell.get_PageHasHelp

Windows Media Encoder SDK banner art

The get_PageHasHelp method retrieves a Boolean value indicating whether Help is defined for a specific page.

Syntax

bool MSPropShell.get_PageHasHelp(
  int  Index
);

Parameters

Index

[in]  Int32 containing the index of a specific property page.

Return Values

A Boolean that indicates whether Help is defined.

Remarks

You can use the get_PageHasHelp method to identify when a Help button should be enabled or disabled.

To use the MSPropShell control, you must add the Microsoft PropShell Control 1.0 reference to the project, and add the MS PropShell Ctrl Class component to the Toolbox. For more information, see Programming in C#.

Example Code

using WMEncoderLib;
using MSPROPSHELLLib;

try
{
// Create a WMEncoder object.
WMEncoder Encoder;
Encoder = new WMEncoder();

// Create the Windows Media Encoder property pages.
WMEncSourcesPage PpgSources = new WMEncSourcesPage();
WMEncDisplayInfoPage PpgDesc = new WMEncDisplayInfoPage();
WMEncAttributesPage PpgAttr = new WMEncAttributesPage();
WMEncProfilePage PpgProfile = new WMEncProfilePage();
WMEncOutputPage PpgOutput = new WMEncOutputPage();

// Add Windows Media Encoder to the property page shell.
// You must add the encoder before adding the property pages.
PropPageShell.AddObject(Encoder);

// Add the property pages to the property page shell. To create an
// MSPropShell ActiveX control, on the Project menu, click Components,
// and then in the Components dialog box, select Microsoft PropShell
// Control 1.0. In the following example, the ActiveX control is named
// PropPageShell.
PropPageShell.AddPage(PpgSources);
PropPageShell.AddPage(PpgDesc);
PropPageShell.AddPage(PpgAttr);
PropPageShell.AddPage(PpgProfile);
PropPageShell.AddPage(PpgOutput);

// Retrieve the index of the active property page.
int lPageIndex;
lPageIndex = PropPageShell.PageIndex;

// Determine whether the active page has Help.
bool bHelp;
bHelp = PropPageShell.get_PageHasHelp(lPageIndex);

// Display the Help for that page.
if (bHelp == true)
{
     PropPageShell.ShowPageHelp(lPageIndex);
}
}

catch (Exception e)
{
     // TODO: Handle exceptions.
}

Requirements

Reference: Microsoft PropShell Control 1.0

Namespace: MSPropShellLib

Assembly: Interop.MSPropShellLib.dll

Library: mspshell.dll

See Also