HeaderPane
Main
Hide

SftButton/DLL 3.0 - Button Control

Share Link
Print

Notifications

The button control sends WM_NOTIFY messages to its parent window for user interaction, state changes and layout events. The code field of the accompanying NMHDR identifies the notification.

NotificationDescription
BN_CLICKEDThe button was clicked. Alias for SFTBUTTONN_CLICK (0).
SFTBUTTONN_KILLFOCUSThe button lost keyboard focus (2).
SFTBUTTONN_SETFOCUSThe button gained keyboard focus (3).
SFTBUTTONN_MOUSEMOVEThe mouse moved over the button (4).
SFTBUTTONN_SIZECHANGEDThe button was resized (5).
SFTBUTTONN_HOVERONThe hover state was activated (6). See Hover Detection.
SFTBUTTONN_HOVEROFFThe hover state was deactivated (7).
SFTBUTTONN_STATECHANGEReserved for internal use (8). The control sends this code to its parent during state transitions; applications must ignore it - the code value, payload and triggering conditions may change between releases.
SFTBUTTONN_DBLCLICKThe button was double-clicked (16).
SFTBUTTONN_DROPDOWNCLICKThe dropdown arrow was clicked (17). Only raised when fShowDropDown is TRUE. See Dropdown Button.
SFTBUTTONN_DROPDOWNDBLCLICKThe dropdown arrow was double-clicked (18).
SFTBUTTONN_MBUTTONDOWNThe middle mouse button was pressed over the button (20).
SFTBUTTONN_MBUTTONDBLCLKThe middle mouse button was double-clicked over the button (21).
SFTBUTTONN_RBUTTONDOWNThe right mouse button was pressed over the button (22).
SFTBUTTONN_RBUTTONDBLCLKThe right mouse button was double-clicked over the button (23).
SFTBUTTONN_DARKMODE_CHANGEDThe effective dark-mode state flipped (30). Sent only when the control's dark mode is SFTBUTTON_DARKMODE_AUTO and the Windows "Choose your mode" setting changes. See Dark Mode.
SFTBUTTONN_HIGHCONTRAST_CHANGEDThe effective high-contrast state flipped (31). Sent only when the control's high contrast mode is SFTBUTTON_HIGHCONTRAST_AUTO and the Windows High Contrast setting changes. See High Contrast.
SFTBUTTONN_DPI_CHANGEDThe DPI for the monitor containing the button control changed (32). The button has already re-scaled its metrics and images; the notification lets the application repaint its own surrounding chrome. See Per-Monitor DPI and Scaling.

All notifications deliver an NMHDR structure. Notifications that carry additional data use NMHDR-derived structures (see SftButton.h).

See Also C/C++ API | Windows Messages | MFC and Notifications


Last Updated 05/09/2026 - (email)
© 2026 Softel vdm, Inc.