ISpVoice::DisplayUI
Other versions of this page are also available for the following:
8/28/2008
This method displays the UI from the object token for the underlying TTS engine. The best way to use this method is to first call ISpVoice::IsUISupported with a specific UI type. A call to this method is synchronous. Thus the method does not return until the UI has been closed.
Syntax
[local] HRESULT DisplayUI(
HWND hwndParent,
const WCHAR* pszTitle,
const WCHAR* pszTypeOfUI,
void* pvExtraData,
ULONG cbExtraData
);
Parameters
- hwndParent
[in] Handle to parent window information.
- pszTitle
[in] Pointer to a null-terminated string specifying window title information. You can set this value to NULL to indicate that the TTS engine should use its default window title for this UI type.
- pszTypeOfUI
[in] Pointer to a null-terminated string specifying the UI type to display.
- pvExtraData
[in] Pointer to additional information needed for the UI. The TTS engine implementation dictates the format and use of the data provided.
- cbExtraData
[in] Size, in bytes, of the extra data specified by pvExtraData. The TTS engine implementation dictates the format and use of the data provided.
Example
The following code snippet illustrates the use of this method using SPDUI_EngineProperties.
HRESULT hr = S_OK;
// display properties UI for the current TTS engine
hr = cpVoice->DisplayUI(MY_HWND, MY_APP_VOICE_PROPERTIES,
SPDUI_EngineProperties, NULL, NULL);
// Check hr
Return Value
The following table shows the possible return values.
Value | Description |
---|---|
S_OK |
Function completed successfully. |
S_FALSE |
The UI is supported but not with the current run time environment or parameters. |
E_INVALIDARG |
One or more arguments are invalid. |
FAILED(hr) |
Appropriate error message. |
Requirements
Header | sapi.h, sapi.idl |
Library | sapilib.lib |
Windows Embedded CE | Windows CE .NET 4.1 and later |