Teen Programmers Unite  


Return to forum top

Windows API checkbox in dialog

Posted by phi [send private reply] at September 23, 2002, 07:08:22 PM

I already know how to change the text label of a checkbox in a dialog window, using SetDlgItemText. But how can I change the state of a checkbox (whether it is checked or unchecked)?

[What I would like to do is if the user checks one checkbox, another checkbox is automatically checked by my application.]

Thanks in advance for any help.

Posted by Psion [send private reply] at September 23, 2002, 08:47:42 PM

I'm sure you can find this information in MSDN.

Posted by buzgub [send private reply] at September 23, 2002, 09:54:10 PM

There's probably a message for a check box being checked; can you catch that for the first checkbox, and send another of them to the second checkbox?

Posted by Neumann [send private reply] at September 23, 2002, 10:04:02 PM

phi: Use the BM_SETCHECK/BM_GETCHECK message to set/get the state of a check box.


You must be logged in to post messages and see which you have already read.

Log on
Save for later automatic logon

Register as a new user
Copyright TPU 2002. See the Credits and About TPU for more information.