Hi all,

Suppose I have a button, named Button1.
1) How do I attach a tooltip to it?
2) What message(s) should I be interested in, to show the tooltip.

What I have found so far is this:

.ElseIf uMsg == WM_NOTIFY
Mov Edx, lParam ; Get subcommand
Mov Eax, (NMHDR Ptr ).code ; Save it
.If Eax == TTN_NEEDTEXT ; Notification message used to retrieve text
; Toolbar tooltip
Mov Edx, (NMHDR Ptr ).idFrom ; Save it
inv LoadString, hInstance, Edx, Addr buffer, SizeOf buffer ; Get the message
Lea Eax, buffer ; Initialize the buffer pointer
Mov Edx, lParam ; Get subcommand
Mov (TOOLTIPTEXT Ptr ).lpszText, Eax ; Display tooltip

My question is: Can this code only be used for a toolbar, or can it be used for any
child control of a window?
And is this the only message I should be interested in? Or is there an other or even better way?

But then again it is not clear to me how and where I set a string to the tooltip,
and assign that tooltip to the control.
Can anybode show me in only a few lines of code how it can be done?
Or am I asking to much now?

Friendly regards,
mdevries.
Posted on 2004-11-12 14:28:57 by mdevries
The attachment is a very simple demonstration of how to use ToolTips.
Posted on 2004-11-12 20:24:30 by anon
Thank you, anon, for your clear example.
I can use that very well.

Friendly regards,
mdevries
Posted on 2004-11-13 08:33:40 by mdevries
Where is the attachment? I would like to have it.

Thanks!
Posted on 2005-09-27 08:45:31 by TropE
Where is the attachment?

mdevries took it :D
Posted on 2005-09-27 09:30:51 by Shoo
<snicker>
Posted on 2005-09-27 09:46:18 by JimmyClif
an example in Radasm.
Attachments:
Posted on 2005-09-27 10:31:19 by dcskm4200
cool thanks! will this work for toolbar buttons?
Posted on 2005-09-27 15:04:33 by TropE