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

ISpTokenUI

Provides developers with a means to programmatically manage user-interface associated with an ISpObjectToken.

When To Implement

The ISpTokenUI interface should be implemented so that the object can allow other applications to display the UI. For example, an SR engine (see ISpRecognizer) has a UI for Training (see SPDUI_UserTraining), and it would be helpful for an application to be able to display the Training UI as appropriate.

Example

The following code snippet illustrates the use of ISpTokenUI using QueryInterface.

    HRESULT hr = S_OK;

    // find the preferred multimedia input object token
    hr = SpFindBestToken(SPCAT_AUDIOIN, L"Technology=MMSys", NULL, &cpObjectToken);
    // Check hr

    // get the multimedia object token's UI
    hr = cpObjectToken->QueryInterface(&cpTokenUI);
    // Check hr

The following code snippet illustrates the use of ISpTokenUI using CoCreateInstance. The user must know the exact CLSID of the intended UI object.

    HRESULT hr = S_OK;

    // create the Token UI for the UI object CLSID_MY_TOKEN_UI
    hr = cpTokenUI.CoCreateInstance(CLSID_MY_TOKEN_UI);
    // Check hr

Methods in Vtable Order

ISpTokenUI Methods Description
IsUISupported Determines if the specified UI type is supported by the token.
DisplayUI Displays the UI associated with the object token.

Development Helpers

Helper Functions Description
SpCreateBestObject Creates the most appropriate object based on specific criteria.
SpFindBestToken Finds the most appropriate IspObjectToken based on specific criteria.
SpCreateObjectFromToken Creates an object based on a specified ISpObjectToken.
SpCreateDefaultObjectFromCategoryId Creates the default object from a specific category.
SpGetTokenFromId Creates an ISpObjectToken based on a token id.
SpGetDefaultTokenFromCategoryId Creates the default ISpObjectToken from a specific category.


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