dynamic creation of buttons and tooltips?
-
I'm creating many buttons dynamically using this to initialize it: m_Icon[ndx].Create(_T(""), WS_CHILD WS_VISIBLE , CRect(0, 0, 0, 0), this,IDC_BTN ); Then later I'm adding in other information and then putting it on the screen: m_Icon[0].SetTooltipText((LPCTSTR)ps1,true); m_Icon[0].ActivateTooltip(true); m_Icon[0].SetIcon(IDI_ICON1,NULL); m_Icon[0].MoveWindow(iXpos ,(yscalestart + yscalediff*(profile.counter[0].iStationNum -10)),29,33,TRUE); Any ideas on why the tool tip doesn't work? I've used tool tips before using static items and it was never a problem Thanks, Jim
-
I'm creating many buttons dynamically using this to initialize it: m_Icon[ndx].Create(_T(""), WS_CHILD WS_VISIBLE , CRect(0, 0, 0, 0), this,IDC_BTN ); Then later I'm adding in other information and then putting it on the screen: m_Icon[0].SetTooltipText((LPCTSTR)ps1,true); m_Icon[0].ActivateTooltip(true); m_Icon[0].SetIcon(IDI_ICON1,NULL); m_Icon[0].MoveWindow(iXpos ,(yscalestart + yscalediff*(profile.counter[0].iStationNum -10)),29,33,TRUE); Any ideas on why the tool tip doesn't work? I've used tool tips before using static items and it was never a problem Thanks, Jim
Hi, You need to relayevent to the tooltip control. Otherwise, how tooltip control will know when & where to show what? Also, whether you are using CTooltipCtrl? If so, then you have to add some more stuff also like addtool, etc.. regards ~Hari~
-
Hi, You need to relayevent to the tooltip control. Otherwise, how tooltip control will know when & where to show what? Also, whether you are using CTooltipCtrl? If so, then you have to add some more stuff also like addtool, etc.. regards ~Hari~