SAPI事件SPEI_WORD_BOUNDARY通知不起作用

时间:2010-01-22 14:01:36

标签: sapi

I have used this function to speak sentence ascynchronously .    

m_cpVoice->发言(m_sInputText,SPF_ASYNC,NULL))

I want to get notification of SPEI_WORD_BOUNDARY event so i did these.


 m_cpVoice->SetInterest(SPFEI(SPEI_WORD_BOUNDARY),SPFEI(SPEI_WORD_BOUNDARY));
 m_cpVoice->SetNotifyWindowMessage(GetSafeHwnd(),CTTSDlgDlg::MSG_SAPI_EVENT,0,0);

 CTTSDlgDlg::MSG_SAPI_EVENT maps to my event handler.

Am i missing something and whats the problem that i am not getting notification?

1 个答案:

答案 0 :(得分:1)

MFC需要ON_REGISTERED_MESSAGE而不是ON_MESSAGE才能将您的事件传递到您的对象。