CXTPToolTipContext problem |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 17 September 2006 at 3:34pm |
I made a button, derived from CXTButton, with 2007-styled tooltips. It works as expected until I click the button. After that, the tooltip is the same old yellow rectangle again... what's causing this? Here's my button class:
http://www.bostream.nu/krisse/XTSimpleButton.zip |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, Don't call EnableToolTips if you use tooltipcontext.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
If I remove the call to EnableToolTips, the tooltipcontext disappears too. Even if I remove the call, the office2007 tips are never shown once I have pushed the button. So, I am sure that EnableToolTips has nothing to do with the disappearance of the tooltips.
Any ideas? Thanks!
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
yes, problem in TooltipContext that was not designed to work with full window. as workaround change:
INT_PTR CXTSimpleButton::OnToolHitTest(CPoint point, TOOLINFO* pTI) const
{ ASSERT_VALID(this); ASSERT(::IsWindow(m_hWnd)); int nID = GetDlgCtrlID();
CXTPClientRect rc(m_hWnd);
rc.DeflateRect(3, 3); if (!rc.PtInRect(point))
return -1; CXTPToolTipContext::FillInToolInfo(pTI, m_hWnd, rc, nID, m_strToolTip, m_strToolCaption, m_strToolTip);
return nID; } |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
.. And anyway remove EnableToolTips...
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Thank you very much!! =)
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |