Print Page | Close Window

CXTPToolTipContext problem

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=5071
Printed Date: 14 May 2024 at 10:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPToolTipContext problem
Posted By: znakeeye
Subject: CXTPToolTipContext problem
Date 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



Replies:
Posted By: Oleg
Date Posted: 18 September 2006 at 3:10am

Hi,

Don't call EnableToolTips if you use tooltipcontext.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 18 September 2006 at 10:41am

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!


Posted By: Oleg
Date Posted: 18 September 2006 at 11:49am
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


Posted By: Oleg
Date Posted: 18 September 2006 at 11:50am
.. And anyway remove EnableToolTips...

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: znakeeye
Date Posted: 18 September 2006 at 12:17pm
Thank you very much!! =)



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net