Jump to content

WinQueryButtonCheckState

From EDM2
Revision as of 14:32, 9 April 2025 by Martini (talk | contribs) (Created page with "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. <Pre> #define WinQueryButtonCheckstate(hwndDlg, usId)   ((USHORT)WinSendDlgItemMs...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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