Gets the check state of a radio button or check box. You can send this message explicitly or use the Button_GetCheck macro.
Syntax
To send this message, call the
SendMessage
function as follows.
lResult = SendMessage( // returns LRESULT in lResult
hWndControl, // (HWND) handle to destination control
BM_GETCHECK, // (UINT) message ID
wParam, // = 0; not used, must be zero
lParam // = 0L; not used, must be zero
);
Parameters
- wParam
-
Not used; must be zero.
- lParam
-
Not used; must be zero.
Return Value
The return value from a button created with the BS_AUTOCHECKBOX, BS_AUTORADIOBUTTON, BS_AUTO3STATE, BS_CHECKBOX, BS_RADIOBUTTON, or BS_3STATE style can be one of the following.
| BST_CHECKED | Button is checked. |
| BST_INDETERMINATE | Button is grayed, indicating an indeterminate state (applies only if the button has the BS_3STATE or BS_AUTO3STATE style). |
| BST_UNCHECKED | Button is cleared |
Remarks
If the button has a style other than those listed, the return value is zero.
Message Information
| Header | Declared in Winuser.h, include Windows.h |
|---|
| Minimum operating systems |
Windows 95, Windows NT 3.1 |
|---|
See Also