Jump to content

WinQueryButtonCheckState

From EDM2

This macro returns the checked state of the button control specified.

Syntax

 WinQueryButtonCheckstate(hwndDlg, usId)

Parameters

hwndDlg (HWND) - Input
Dialog window handle.
usId (USHORT) - Input
Button control identity.

Returns

usRetChkst (USHORT) - returns
Returns the checkstate of the specified button control.

Remarks

This macro expands to&colon.

#define WinQueryButtonCheckstate(hwndDlg, usId)
  ((USHORT)WinSendDlgItemMsg(hwndDlg,
                             usId,
                             BM_QUERYCHECK,
                             (MPARAM)NULL,
                             (MPARAM)NULL))

This function requires the existence of a message queue.

Example Code

#define INCL_WINWINDOWMGR
#define INCL_WINBUTTONS
#include <OS2.H>

#define IDM_BUTTONA 900

HWND hwndDlg;
USHORT ChkState;


ChkState = WinQueryButtonCheckstate(hwndDlg, IDM_BUTTONA);

switch (ChkState)
{
  case 0:
     /*  Unchecked  */
   break;
  case 1:
     /*  Checked  */
     break;
  case 2:
     /*  Indeterminate. */
     break;
}

Related Messages

Related Functions