Click to See Complete Forum and Search --> : I want to use CToolTipCtrl in CMyWnd derived from CFrameWnd


kim, dongshin
March 31st, 1999, 07:53 AM
Hello!

I'm korean student.

I want to use CToolTipCtrl in MyWnd derived from CFrameWnd.

The window has many region for tips.

and Tiptext can change dynamicaly.

1. m_ToolTip.Create(this, TTS_ALWAYSTIP);

2. m_ToolTip.AddTool(this);

3. If mouse pointer is in particular region call

m_ToolTip.Activate(TRUE);

m_ToolTip.UpdateTipText("Hello",(CWnd*)this);

else

m_ToolTip.Activate(FALSE);

4. For dynamic text change, call

m_ToolTip.UpdateTipText("Hello",(CWnd*)this);


What is wrong?

Help...

thank you...

Bob
March 31st, 1999, 09:59 AM
You need an additional event:


BOOL CSomething::PreTranslateMessage(MSG* pMsg)

{

m_ToolTip.RelayEvent(pMsg);

return CControlBar::PreTranslateMessage(pMsg);

}

April 2nd, 1999, 08:47 AM
thank you very much...