How to add tooltip for CTXPTaskPanel control |
Post Reply |
Author | |
floydzhang
Groupie Joined: 08 March 2008 Status: Offline Points: 50 |
Post Options
Thanks(0)
Posted: 20 April 2009 at 10:40am |
Hi,
How to add tooltip for items of CXTPTaskPanel control? Any idea? Thanks. Boyang |
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 873 |
Post Options
Thanks(0)
|
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. |
|
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 |