Print Page | Close Window

CXTPToolTipContext::FillInToolInfo question

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=14634
Printed Date: 04 May 2024 at 3:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPToolTipContext::FillInToolInfo question
Posted By: rdhd
Subject: CXTPToolTipContext::FillInToolInfo question
Date Posted: 26 June 2009 at 6:10pm
I have dialogs that have static text on them. Sometimes we modify the text and place "..." in it while shortening the text (calling DrawTextEx and ::SetWindowText with the results). So I decided to show a tooltip over the text. Is it possible to do so? Even though I am handling OnToolHitTest and calling

CXTPToolTipContext::FillInToolInfo

The tip never shows up. I am already filling in the tool info for non-static controls with no problem (in the same code). The only difference when the text fails to show up (other than the description passed into the call) is the hWnd is that of a static control and the uID is -1. I have tried hard-coding the uID to 5 and then even setting it to the id of another control that tips with no problem (just to see if that would make a difference) but neither worked. That only leaves me with the hWnd passed in being that of a static control. Oh, I tried hard-coding in the hWnd of one of the other non-static controls (the same one I stole the control ID from) but that failed too (I expected it to since the system would probably think I had already moved over another window before the tip timer went off).
 
So is there some issue with static controls that causesthe tip to fail to show up even though I make the call to FillInToolInfo?



Replies:
Posted By: rdhd
Date Posted: 09 July 2009 at 4:21pm
I found out what I was doing wrong. Even though I called FillInToolInfo with the child window, I still returned -1 from the OnToolHitTest function. That causes CJ to fail to acitvate the tip. So I simply set my return value to zero when I called FillInToolInfo from OnToolHitTest for a static window. I just didn't step through enough of the CJ code after returning from OnToolHitTest to realize that was the cause. So now my static text tips when necessary.



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