IAPCSpeech::SetMsgOptions
This method sets options for message notifications.
Syntax
HRESULT IAPCSpeech::SetMsgOptions ( DWORD dwFlags, DWORD dwVCmdOpt, DWORD dwVTxtOpt );
Parameters
- dwFlags
- Reserved; set to 0.
- dwVCmdOpt
- Specifies options for the voice command notifications. It is one or a both of the following values:
| VCMDRF_CMDOTHER |
| VCMDRF_CMDSTART |
- dwVCmdOpt
- Specifies options for the voice text notifications. It is one or a combination of the following values:
| VTXTF_SPEAKSTART |
| VTXTF_SPEAKDONE |
Return Values
An appropriate HRESULT value is returned.
Remarks
By default, the applications always receive the following speech notifications:
- WM_SPCH_RECOG, where wParam is the DWORD associated with the command and lParam is the command identifier.
- WM_SPCH_SNDDONE indicates that the wave file played by sndPlaySound is done.
- WM_SPCH_NOTIFY, where wParam equals VCMDRF_ATTRIBCHANGE, VTXTF_SPEAK, or VTXT_SPEAKSTOP.
SetMsgOptions can be used to enable an application to receive in wParam the four additional WM_SPCH_NOTIFY messages set in dwVCmdOpt and dwVCmdOpt.
Once SetMsgOptions has been called with VTXTF_SPEAKSTART, VTXTF_SPEAKSTOP, or both, it cannot be called again to reset the option.
See Also
sndPlaySound