Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPToolTipContext::FillInToolInfo question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPToolTipContext::FillInToolInfo question

 Post Reply Post Reply
Author
Message
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 Topic: CXTPToolTipContext::FillInToolInfo question
    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?
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: 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.
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.156 seconds.