News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

CheckBoxes

Started by realcr, December 27, 2004, 11:41:31 AM

Previous topic - Next topic

realcr

How can I get the state of a checkbox? (checked , not checked)?

bar.

Ramon Sala

Hi realcr,

Invoke SendMessage, hWnd, BM_GETCHECK, 0, 0


hWnd = Handle for the check box


It returns BST_CHECKED (1) or BST_UNCHECKED (0) in Register Eax.

Regards,

Ramon
Greetings from Catalonia

pbrennick

Hi realcr,
Be sure to read up about this topic in the win32.hlp file.  In addition to rsala's method, which works fine you can use The IsDlgButtonChecked function to determines whether a button control has a check mark next to it or whether a three-state button control is grayed, checked, or neither.
Paul

realcr