May 25th, 1999, 11:06 AM
I am developing an application where the screen is changed several times without changing the view object. Because of this, I am adding and deleting tooltips constantly. Only problem is the tooltips refuse to appear.
I do the following in OnInitialUpdate()
void CViewTestView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
//code deleted
EnableToolTips (TRUE);
m_ToolTip.Create(this, TTS_ALWAYSTIP);
}
Later on I use the following code to add and delete the tooltips where CViewArea is defined as:
class CViewArea
{
public:
CViewArea();
virtual ~CViewArea();
CRect m_ViewGUILoc;
CString m_strToolTip;
};
I call this function for each object that needs a tooltip is located on a screen change is found:
void CViewTestView::CreateToolTips(CViewArea *viewData)
{
m_ButtonNum++;
m_ToolTip.AddTool (this,viewData->m_strToolTip, viewData->m_ViewGUILoc, 1000 + m_ButtonNum);
}
On any screen change that occurs where the old screen had any tooltips, this function is called:
void CViewTestView::DeleteToolTips()
{
for (; m_ButtonNum > 0; m_ButtonNum--)
m_ToolTip.DelTool (this, m_ButtonNum + 1000);
}
Whenever I pause over an area where a tooltip is suppose to pop up, nothing happens. Any help out there?
Lynn Svedin
I do the following in OnInitialUpdate()
void CViewTestView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
//code deleted
EnableToolTips (TRUE);
m_ToolTip.Create(this, TTS_ALWAYSTIP);
}
Later on I use the following code to add and delete the tooltips where CViewArea is defined as:
class CViewArea
{
public:
CViewArea();
virtual ~CViewArea();
CRect m_ViewGUILoc;
CString m_strToolTip;
};
I call this function for each object that needs a tooltip is located on a screen change is found:
void CViewTestView::CreateToolTips(CViewArea *viewData)
{
m_ButtonNum++;
m_ToolTip.AddTool (this,viewData->m_strToolTip, viewData->m_ViewGUILoc, 1000 + m_ButtonNum);
}
On any screen change that occurs where the old screen had any tooltips, this function is called:
void CViewTestView::DeleteToolTips()
{
for (; m_ButtonNum > 0; m_ButtonNum--)
m_ToolTip.DelTool (this, m_ButtonNum + 1000);
}
Whenever I pause over an area where a tooltip is suppose to pop up, nothing happens. Any help out there?
Lynn Svedin