ISRGramCommon::TrainDlg

HRESULT TrainDlg(HWND hWndParent, PTSTR pszTitle);

Displays a dialog box so the speaker can train the grammar.

· Returns NOERROR if successful, or one of these error values:

E_INVALIDARG
E_OUTOFMEMORY
SRERR_INVALIDWINDOW
SRERR_NOTSUPPORTED
SRERR_VALUEOUTOFRANGE

hWndParent

[in] Handle of the parent window for the modal dialog box. If this parameter is NULL, the engine returns NOERROR if it supports that dialog box, or SRERR_NOTSUPPORTED if it doesn't.

pszTitle

[in] Address of the string to use as the title of the dialog box. Can be NULL to direct the engine to provide a default title.

The dialog box is provided by a speech-recognition engine. The dialog box should give the speaker a choice of training only untrained entries and indicate the entries that are not yet trained. This allows the speaker to train the grammar for individual words when necessary. Training information is "attached" to both the speaker and the microphone.

If the engine does not supply this dialog box, the speaker cannot train the grammar; however, the application will still work.