Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - How to add tooltip for CTXPTaskPanel control
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to add tooltip for CTXPTaskPanel control

 Post Reply Post Reply
Author
Message
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post Topic: How to add tooltip for CTXPTaskPanel control
    Posted: 20 April 2009 at 10:40am
Hi,

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

Thanks.

Boyang
Back to Top
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 867
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.186 seconds.