CheckDlgButton
Changes the check state of a button control.
Syntax
BOOL CheckDlgButton(
HWND hDlg,
int nIDButton,
UINT uCheck
);
Parameters
- hDlg
[in] A handle to the dialog box that contains the button.
nIDButton
[in] The identifier of the button to modify.
uCheck
[in] The check state of the button. This parameter can be one of the following values.
BST_CHECKED
Sets the button state to checked.
BST_INDETERMINATE
Sets the button state to grayed, indicating an indeterminate state. Use this value only if the button has the BS_3STATE or BS_AUTO3STATE style.
BST_UNCHECKED
Sets the button state to cleared
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The CheckDlgButton function sends a BM_SETCHECK message to the specified button control in the specified dialog box.
Function Information
- Minimum DLL Version user32.dll
- Header Declared in Winuser.h, include Windows.h
- Import library User32.lib
- Minimum operating systems Windows 95, Windows NT 3.1