When a check box sends the wm_command message, does the wNotifyCode part contain a number saying wether its being checked or unchecked? Or is there another way?
Posted on 2002-06-16 04:07:05 by ChimpFace9000
....
When the user selects a check box (of any style), the check box receives the keyboard focus from Windows, which sends the check box's parent window a WM_COMMAND message containing the BN_CLICKED notification code. The parent window doesn't acknowledge this message if it comes from an automatic check box or automatic three-state check box, because Windows automatically sets the check state for those styles. But the parent window must acknowledge the message if it comes from a check box or three-state check box because the parent window, not Windows, is responsible for setting the check state for those styles. Regardless of the check box style, Windows automatically repaints the check box once its state is changed.
....


The CheckDlgButton function changes the check state of a button control.

BOOL CheckDlgButton(

HWND hDlg, // handle to dialog box
int nIDButton, // button-control identifier
UINT uCheck // check state
);
Posted on 2002-06-16 04:14:06 by hunter
The IsDlgButtonChecked function determines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither.

UINT IsDlgButtonChecked(

HWND hDlg, // handle of dialog box
int nIDButton // button identifier
);

Parameters

hDlg

Identifies the dialog box that contains the button control.

nIDButton

Specifies the integer identifier of the button control.



Return Values

The return value from a button created with the BS_AUTOCHECKBOX, BS_AUTORADIOBUTTON, BS_AUTO3STATE, BS_CHECKBOX, BS_RADIOBUTTON, or BS_3STATE style can be one of the following:

Value Meaning
BST_CHECKED Button is checked.
BST_INDETERMINATE Button is grayed, indicating an indeterminate state (applies only if the button has the BS_3STATE or BS_AUTO3STATE style).
BST_UNCHECKED Button is unchecked


If the button has any other style, the return value is zero.

Remarks

The IsDlgButtonChecked function sends a BM_GETCHECK message to the specified button control.
Posted on 2002-06-16 04:22:27 by hunter