CXTPToolTipContext::FillInToolInfo question |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
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?
|
|
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 891 |
Post Options
Thanks(0)
|
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.
|
|
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 |