Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IsDlgButtonChecked function

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

hDlg [in]

Type: HWND

A handle to the dialog box that contains the button control.

nIDButton [in]

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 codeDescription
BST_CHECKED

The button is checked.

BST_INDETERMINATE

The button is in an indeterminate state (applies only if the button has the BS_3STATE or BS_AUTO3STATE style).

BST_UNCHECKED

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

CheckDlgButton

 

 

Community Additions

ADD
Show:
© 2015 Microsoft