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.
| Notification | Description |
| BN_CLICKED | The button was clicked. Alias for SFTBUTTONN_CLICK (0). |
| SFTBUTTONN_KILLFOCUS | The button lost keyboard focus (2). |
| SFTBUTTONN_SETFOCUS | The button gained keyboard focus (3). |
| SFTBUTTONN_MOUSEMOVE | The mouse moved over the button (4). |
| SFTBUTTONN_SIZECHANGED | The button was resized (5). |
| SFTBUTTONN_HOVERON | The hover state was activated (6). See Hover Detection. |
| SFTBUTTONN_HOVEROFF | The hover state was deactivated (7). |
| SFTBUTTONN_STATECHANGE | Reserved 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_DBLCLICK | The button was double-clicked (16). |
| SFTBUTTONN_DROPDOWNCLICK | The dropdown arrow was clicked (17). Only raised when fShowDropDown is TRUE. See Dropdown Button. |
| SFTBUTTONN_DROPDOWNDBLCLICK | The dropdown arrow was double-clicked (18). |
| SFTBUTTONN_MBUTTONDOWN | The middle mouse button was pressed over the button (20). |
| SFTBUTTONN_MBUTTONDBLCLK | The middle mouse button was double-clicked over the button (21). |
| SFTBUTTONN_RBUTTONDOWN | The right mouse button was pressed over the button (22). |
| SFTBUTTONN_RBUTTONDBLCLK | The right mouse button was double-clicked over the button (23). |
| SFTBUTTONN_DARKMODE_CHANGED | The 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_CHANGED | The 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_CHANGED | The 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