How do I replace text in control defined with AddControl?
Last reviewed: 6/11/2001
HOW Article ID: H060101
The information in this article applies to:
- SpeechKit 3
Summary
SpeechKit 3 AddControl can be used to automatically place text in edit controls. With AddControl, when the designated label for the control is spoken, the edit control receives focus and the vocabulary associated with the control is activated. All recognized speech is placed in the text box. If more than one recognition occurs or if text is already in the the control, the new text is appended to the end.
More Information
SpeechKit 3 SR1 provides a way for you to specify that you want recognized speech to replace the text in the edit control rather and than appending to existing text. A new enumeration type ControlOptions provides two values: AppendControlText and ReplaceControlText. AppendControlText is the default. To replace text, Or (add) the enumartion value ReplaceControlText to your VocabularyType. For example, the AddControl statement would look like:
AddControl(ssEdithWnd, "social security number", "digits", GrammarVocabulary | ReplaceControlText, NullArray, FormhWnd)