I need to get a tip information when I move coursor over a button. I know how to do this in List Control but don't know how to show a tip from a button
in your class's header file make a variable of type CToolTipCtrl. For instance:
Code:
CToolTipCtrl m_ToolTips;
Then in your dialog's OnInitDialog() or CFormView's OnInitialUpdate():
Code:
m_ToolTips.Create(this);
m_ToolTips.SetDelayTime(100);
m_ToolTips.AddTool(&m_cmdZoom1,_T("See larger version of this text."));
In the above example, 'm_cmdZoom' is the name of a CButton variable that is mapped to a button on my dialog. Then just call m_ToolTips.AddTool() like this for each control, passing it the address of your CButton object. You only need one CToolTipCtrl variable for your whole form, and it will accomodate all the controls you add to it. Easy, wasn't it? Hope this helped.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.