Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The IsDlgButtonChecked function determines whether a button control is checked or whether a three-state button control is checked, unchecked, or indeterminate.
Syntax
UINT IsDlgButtonChecked(
[in] HWND hDlg,
[in] int nIDButton
);
Parameters
[in] hDlg
Type: HWND
A handle to the dialog box that contains the button control.
[in] nIDButton
Type: int
The identifier of the button control.
Return value
Type: UINT
The return value from a button created with the BS_AUTOCHECKBOX, BS_AUTORADIOBUTTON, BS_AUTO3STATE, BS_CHECKBOX, BS_RADIOBUTTON, or BS_3STATE styles can be one of the values in the following table. If the button has any other style, the return value is zero.
Return code | Description |
---|---|
|
The button is checked. |
|
The button is in an indeterminate state (applies only if the button has the BS_3STATE or BS_AUTO3STATE style). |
|
The button is not checked. |
Remarks
The IsDlgButtonChecked function sends a BM_GETCHECK message to the specified button control.
Examples
For an example, see the section titled "Creating a Modeless Dialog Box" in Using Dialog Boxes.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winuser.h (include Windows.h) |
Library | User32.lib |
DLL | User32.dll |
API set | ext-ms-win-ntuser-dialogbox-l1-1-0 (introduced in Windows 8) |