Argh, I didn't even think to look at the documentation for the actual function.
Thanks
Edit. So that's not Microsoft's documentation nor their function. So I need to wrap the following:
code:
BOOL CMsAgentWrapper:peak(CString szSpeakText,BOOL bBalloonEnabled,BOOL bBalloonSizeToText,BOOL bBalloonAutoPace,BOOL bBalloonAutoHide)
{
if(m_bAgentReady == FALSE)
return TRUE;
szSpeakText.TrimLeft();
szSpeakText.TrimRight();
if(szSpeakText.IsEmpty())
return FALSE;
if(m_pszCurCharID == NULL)
return FALSE;
CAgentCtlCharacterEx Character;
COleVariant vEmpty;
COleVariant vText;
CString pszText;
UINT uBalloonFlags;
uBalloonFlags = 0;
Character = m_obAgent.GetCharacters().Character(m_pszCurCharID);
if (bBalloonEnabled)
uBalloonFlags |= BALLOON_STYLE_BALLOON_ON;
if (bBalloonSizeToText)
uBalloonFlags |= BALLOON_STYLE_SIZETOTEXT;
if (bBalloonAutoPace)
uBalloonFlags |= BALLOON_STYLE_AUTOPACE;
if (bBalloonAutoHide)
uBalloonFlags |= BALLOON_STYLE_AUTOHIDE;
Character.GetBalloon().SetStyle((long)uBalloonFlags);
if (m_bStopBeforePlay)
Character.StopAll(vEmpty);
vText = szSpeakText;
Character.Speak(vText, vEmpty);
return TRUE;
}
But, I can't seem to call Character.GetBalloon() !
(I would imagine all I need to do is set a certain bit and call Character.GetBalloon().SetStyle(my bits);
But like I said, the function doesn't work.