Click to See Complete Forum and Search --> : determining the state


SunCore
August 4th, 2005, 05:58 AM
hi all,

does someone know how to detemine the state of a radio button and a checkbox?

thanks in advance.

philkr
August 4th, 2005, 06:10 AM
int nCheck = SendMessage(hWnd, BM_GETCHECK, 0, 0);
// Values for nCheck: BST_CHECKED, BST_UNCHECKED, BST_INDETERMINATE

golanshahar
August 4th, 2005, 06:21 AM
in addition to what was said above you can look at this Thread (http://www.codeguru.com/forum/showthread.php?t=351328).


Cheers

NoHero
August 4th, 2005, 06:37 AM
Apart from that you can also use "IsDlgButtonChecked()". This is better readable for third party programmers than a SendMessage() construct.