Print Page | Close Window

How to add tooltip for CTXPTaskPanel control

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=14084
Printed Date: 22 June 2024 at 11:25pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to add tooltip for CTXPTaskPanel control
Posted By: floydzhang
Subject: How to add tooltip for CTXPTaskPanel control
Date Posted: 20 April 2009 at 10:40am
Hi,

How  to add tooltip for items of CXTPTaskPanel control? Any idea?

Thanks.

Boyang



Replies:
Posted By: rdhd
Date Posted: 20 April 2009 at 3:13pm
Normally one just adds the tooltip to the MFC resource file where the ID of the tooltip is the same as the control ID. But you can also implement OnToolHitTest and set any tip you choose and the method you obtain the tip text is up to you. For instance, we have some controls that the tip changes depending on the context so a single text string in the resource is not sufficient. After we determine the control that is hit, we simply call

CXTPToolTipContext::FillInToolInfo( pTI, pTI->hwnd, rect, pTI->uId, strTipDescription, strTipTitle, strTipDescription );

The method is static and the TOOLINFO (pTI param above) passed into OnToolHitTest has all the info CJ needs to set the text on the appropriate CJ tooltip context object. FillInToolInfo is quite useful and makes it very easy to set your  data. Make sure you don't set the LPSTR_TEXTCALLBACK when you call FillInToolInfo.



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