This topic has not yet been rated - Rate this topic

IsDlgButtonChecked function

Applies to: desktop apps only

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 2000 Professional

Minimum supported server

Windows 2000 Server

Header

Winuser.h (include Windows.h)

Library

User32.lib

DLL

User32.dll

See also

CheckDlgButton

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ