HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

Hover Detection

A SftButton tracks hover state separately from mouse-over. The hover state controls which per-state images and colors the control renders, and generates SFTBUTTONN_HOVERON and SFTBUTTONN_HOVEROFF notifications when it flips.

Hover style

iHoverStyle on SFTBUTTON_CONTROL selects the hover-detection region:

StyleHover region
SFTBUTTON_HOVERSTYLE_CONTROL (0)Hover turns on when the mouse enters the button's client rectangle and off when it leaves. Default.
SFTBUTTON_HOVERSTYLE_EXACT (1)Hover turns on only when the mouse is over a pixel that is actually rendered (text or image). Moving the mouse to background padding within the button rectangle turns hover off.

Notifications

SFTBUTTONN_HOVERON is sent when hover starts and SFTBUTTONN_HOVEROFF when it ends. Applications can use these for rollover effects outside the button itself - for example updating a status-bar description or pre-loading a related resource.

Relationship to click regions

Hover style and click style are independent. A button can have click style SFTBUTTON_CLICKSTYLE_CONTROL (clicks anywhere) but hover style SFTBUTTON_HOVERSTYLE_EXACT (rollover highlighting only on visible content).


Last Updated 04/25/2026 - (email)
© 2026 Softel vdm, Inc.