HeaderPane
Main
Hide
Share Link
Print

Notifications

The button control sends WM_COMMAND messages to its parent window for user interaction, state changes and layout events. HIWORD(wParam) is the notification code, LOWORD(wParam) the control ID and lParam the button's window handle.

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.

Notifications carry no additional data. An application queries the control for its current state, for example with SftButton_GetControlInfo.

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


Last Updated 10/11/2026 - (email)
© 2026 Softel vdm, Inc.