WMEncoderApp.SaveProperties
![]() |
The SaveProperties method saves changes to the UI properties.
Syntax
void WMEncoderApp.SaveProperties(
WMENCAPP_PROP_CLASS enumClass
);
Parameters
enumClass
[in] Member of a WMENCAPP_PROP_CLASS enumeration type identifying the property class for which the properties will be saved.
Return Values
If this method fails, it returns an error number.
| Number | Description |
| 0x80070057 | You must specify the property class as WMENCAPP_PROP_USER. |
Remarks
You must call this method because the Windows Media Encoder SDK does not automatically save changes to UI properties.
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
.gif)