CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


The Microsoft.com Speech website Microsoft Speech SDK

SAPI 5.1

ISpRecognizer::DisplayUI

ISpRecognizer::DisplayUI displays the requested UI component from the underlying SR engine.

[local] HRESULT DisplayUI(
   HWND           hwndParent,
   const WCHAR   *pszTitle,
   const WCHAR   *pszTypeOfUI,
   void          *pvExtraData,
   ULONG          cbExtraData
);

Parameters

hwndParent
[in] Specifies the handle of the parent window.
pszTitle
[in] Address of a null-terminated string containing the window title. Set this value to NULL to indicate that the SR engine should use its default window title for this UI type. 
pszTypeOfUI
[in] Address of a null-terminated string containing the UI type information.
pvExtraData
[in] Additional information for the call. The SR engine implementer dictates the format and use of the data provided.
cbExtraData
[in] Size, in bytes, of the contents of pvExtraData. The SR engine implementer dictates the format and usage of the data provided.

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.
FAILED(hr) Appropriate error message.

Remarks

SAPI 5 speech recognition engines are capable of sending UI requests back to the application using SPEI_REQUEST_UI. For example, if the SR engine is receiving a poor audio input signal, it may request the user to perform Microphone Training (see SPDUI_MicTraining). The application can receive these requests by calling ISpRecognizer::SetInterest with SPEI_REQUEST_UI. When the UI request is received, it can call ISpRecognizer::DisplayUI at an appropriate point. The typical SR engine UI requests could be User Training (see SPDUI_UserTraining), Microphone Training (see SPDUI_MicTraining), and Lexicon Updates (see SPDUI_AddRemoveWord). An application can call DisplayUI at any time, and does not necessarily have to wait for a UI request from the SR engine.

To best apply ISpRecognizer::DisplayUI, call ISpRecognizer::IsUISupported with a specific UI type before calling DisplayUI. (see the SR Engine Guide for further information on how an SR engine should implement UI.

The call to DisplayUI is synchronous, so the call will not return until the UI has been closed.

Example

The following code snippet illustrates the use of ISpRecognizer::DisplayUI using SPDUI_UserTraining.

    HRESULT hr = S_OK;

    // display user training UI for the current recognizer
    hr = cpRecognizer->DisplayUI(MY_HWND, MY_APP_USER_TRAINING, SPDUI_UserTraining, NULL, NULL);
    // Check hr


You are reading help file online using chmlib.com

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web