WMEncoderApp.GetProperty
The GetProperty method retrieves a property that identifies the display state of a UI panel, property page, or window.
Syntax
object WMEncoderApp.GetProperty(
WMENCAPP_PROP_CLASS enumClass,
string bstrProperty
);
Parameters
enumClass
[in] Member of a WMENCAPP_PROP_CLASS enumeration type identifying the property class.
bstrProperty
[in] String containing the property.
Return Values
This method returns an Object type containing the property state.
If this method fails, it returns an error number.
Number | Description |
0x80070057 | You must specify the property class as WMENC_PROP_USER. |
0x8007000E | Memory cannot be allocated. |
Remarks
Any change to the UI by an end user causes the property to change appropriately. The following table lists the properties that are currently defined for Windows Media Encoder.
Property | Description |
View\SesProperties | Retrieves the display state of the Session Properties panel. |
View\Sources | Retrieves the display state of the Sources panel. |
View\Audio | Retrieves the display state of the Audio panel. |
View\Monitor | Retrieves the display state of the Monitor panel. |
View\Script | Retrieves the display state of the Annotation panel. |
View\Archive | Retrieves the display state of the Archive panel. |
View\Video1 | Retrieves the display state of the Video window. |
View\MonitorPage | Retrieves the ID of a property page in the Monitor panel:
100 = General page. 300 = Display Information page. 600 = Connections page. |
Video1\Zoom | Retrieves the zoom factor for the video window. For example, a value of 200 means that the zoom factor is 200%. |
Video1\Display | Retrieves the display style of the video window:
0 = Input. 1 = Output. 2 = Both. 3 = Next. 4 = Split. |
Example Code
using WMEncoderLib;
try
{
// Create a WMEncoderApp object.
WMEncoderApp EncoderApp;
EncoderApp = new WMEncoderApp();
// Display the predefined user interface.
EncoderApp.Visible = true;
// Retrieve the user interface properties.
int lHeight;
int lWidth;
int lTop;
int lLeft;
bool bUILock;
object vSourceState;
// Retrieve the height and width, in pixels.
lHeight = EncoderApp.Height;
lWidth = EncoderApp.Width;
// Retrieve the top offset of the user interface.
lTop = EncoderApp.Top;
if (lTop <> 0)
{
lTop = 0;
}
// Retrieve the left offset of the user interface.
lLeft = EncoderApp.Left;
if (lLeft <> 0)
{
lLeft = 0;
}
// Determine whether the user interface is locked.
bUILock = EncoderApp.UILock;
// Display the sources panel.
EncoderApp.SetProperty(WMENCAPP_PROP_CLASS.WMENCAPP_PROP_USER, "View\Sources", true);
// Verify that the sources panel is displayed.
vSourceState = EncoderApp.GetProperty(WMENCAPP_PROP_CLASS.WMENCAPP_PROP_USER, "View\Sources");
EncoderApp.SaveProperties(WMENCAPP_PROP_CLASS.WMENCAPP_PROP_USER);
}
catch (Exception e)
{
// TODO: Handle exceptions.
}
Requirements
Reference: Windows Media Encoder
Namespace: WMEncoderLib
Assembly: Interop.WMEncoderLib.dll
Library: WMEncoderLib.dll
See Also