WinQueryButtonCheckState
Appearance
This macro returns the checked state of the button control specified.
Syntax
WinQueryButtonCheckstate(hwndDlg, usId)
Parameters
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; }