views:

23

answers:

1

I'm using C++ Builder 6 and I need something like TBitBtn, but it should react when mouse is pointing at it by changing to another image. Yes, I know I can use OnStartDoc but there is no OnStopDoc. :(

+1  A: 

Subclass the TBitBtn's WindowProc property to intercept the CM_MOUSEENTER and CM_MOUSEENTER messages (which were exposed as new OnMouseEnter and OnMouseLeave events in later BCB versions). You can use those to update the button's Glyph as needed.

Remy Lebeau - TeamB

related questions