How to detect a mouse click on the balloon tooltip?
Hi all:
It seems like a simple task. I have an XP style balloon tooltip that I created myself using CreateWindowEx() API. I need to trap a notification when user clicks on the body of that balloon. I thought it would be trapping a simple WM_LBUTTONDOWN message but that message is also sent if a user clicks on the X button on the balloon, which should be interpreted differently. Can someone suggest how to differentiate between two and trap only clicks on the balloon body?
[484 byte] By [
dc_2000] at [2007-11-20 10:04:08]

# 1 Re: How to detect a mouse click on the balloon tooltip?
Hmmm... a balloon tip by offical denotation states that all mosue input should do is close. That is all. Period.
Oh well. I'll still help you, as much as I can.
My suggestion would be to get a RECT of the balloon body and test to see if mouse pointer is inside rect.
I need to get going now. If you require futher help, hopefully someone on this board may assist. Or I'll be back tomorrow.
# 2 Re: How to detect a mouse click on the balloon tooltip?
Thanks for your reply, Blobmiester. I do not entirely agree with you:a balloon tip by offical denotation states that all mosue input should do is close. That is allthat is only true for older tooltips. The ones introduced with Windows XP may have an X button, which if clicked should simply remove the tip.
My problem is how to trap that click on the X button and differentiate it from a click on a tootip itself. I know that this could be done -- there's a notification like NIN_BALLOONUSERCLICK for the system tray icon tooltip. I can't seem to find any info on how to get the same notification if balloon tooltip was created manually.
Anyone... Guys?