Freigeben über


ISpVoice::DisplayUI (Windows CE 5.0)

Send Feedback

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.

[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 Values

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

OS Versions: Windows CE .NET 4.1 and later.
Header: Sapi.h, Sapi.idl.
Link Library: Sapilib.lib.

See Also

ISpVoice | SAPI Interfaces

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.