` Printed Icetips Article

Icetips Article



Windows API: Changing button properties when mouse is over using subclassing
2002-10-12 -- Dennis E. Evans
 
Hi all,

"Chris Moore"  wrote in message

> I am trying to change the icon on a button on the Frames toolbar when the
> mouse is over it. I placed a Region control over the button and turned the

   Drop the region and sub class the button.

The zip file has a class that will change the icon (or color, text whatever)
for a button, if you want to work with several buttons use a queue and track
the window proc for the controls.

The mouse leave and hover events are one shot deals so the resetTracking
method must be called.

    Dennis

Download btnicon.zip



Printed November 21, 2024, 12:04 pm
This article has been viewed/printed 35211 times.
Google search has resulted in 28 hits on this article since January 25, 2004.