tags:

views:

72

answers:

1
I have used this function to speak sentence ascynchronously .    

m_cpVoice->Speak(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  A: 

MFC requires ON_REGISTERED_MESSAGE instead of ON_MESSAGE to get your events delivered to your object.

Eric Brown
I think only for registred message MFC requires ON_REGISTERED_MESSAGE mapping.
Ashish
Yes, that's true. If you used a message above WM_APP, you could use ON_MESSAGE. But since you used a registered message, you need to use ON_REGISTERED_MESSAGE to handle it.
Eric Brown