• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 340
  • Last Modified:

Change Tooltip text using the contols handle no MFC

Is there a way to change the Tooltip text when the only info I have is the handle of the control?  
0
BWarmuskerken
Asked:
BWarmuskerken
  • 2
  • 2
1 Solution
 
jkrCommented:
If you have the control's handle, 'SetWindowText()' should work, e.g.

SetWindowText(hToolTip,"New Text");
0
 
BWarmuskerkenAuthor Commented:
Oops, let me clarify.  I have the handle to the button/textbox/etc.., not the tooltip window itself.
0
 
jkrCommented:
If you have the control's handle, you could 'EnumChildWindows()' until you find one with the 'TOOLTIPS_CLASS' class name. BTW, a good starting point for samples is http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/tooltip/tooltip.asp ("About ToolTip Controls ")
0
 
BWarmuskerkenAuthor Commented:
Okay, getting closer.  

Using Spy++ I can narrow down which tooltip window I need to change the text in.  Using SetWindowText on will change the caption in Spy++, but the tooltip text stays the same.  Any ideas where to go from here.
0
 
moduloCommented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now