CToolTipCtrl problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Hello,

I have a problem with CToolTipCtrl, i use it like that :

class myButton : public CButton
{
public:
[..........]
public:
CToolTipCtrl m_tooltip;
};

BOOL CmyButton::PreTranslateMessage(MSG *pMsg)
{
m_tooltip.RelayEvent(pMsg);
return CButton::PreTranslateMessage(pMsg);
}

void CmyButton::SetToolTip(CString s)
{
m_tooltip.Create(this,TTS_ALWAYSTIP);
m_tooltip.AddTool(this,s);
m_tooltip.Activate(TRUE);
}

It works, but only once ! If i click on the button, the tooltip never
appear again, or if i let the mouse without moving, the balloon "pop" and
can't be redraw again. I have of course try
SetDelayTime(TTDT_AUTOPOP,10000000) for fun, but it doesn't work

Anyone have an idea ?

Thanks


.


Quantcast