hey peeps - i need help with programing this trainer im doing. I am coding it for Warcraft II Bnet Edition, and the game itself is based on two races, and im going to make seperate "hacks" for each race. If i were to use radio buttons to define the races, how would it, make the radio buttons tell my program to open up a dialog for humans, if the human radio button is selected, and the dialog for orc, if the orc radio button is selected? ( sorry for slopyness in the message, my enter button wont work ) - help woulbe be appriciated, thanks
Posted on 2001-09-02 08:53:32 by sToNeRiFiK
i assume that you're using a dialog box. to get the state of one of the radio buttons, just call IsDlgButtonChecked, followed by the dialog handle, and the control identifier. depending on the result (BST_CHECKED, BST_UNCHECKED) you can so several other things.

hope that helps.

Posted on 2001-09-02 11:26:29 by NOP-erator
Your window gets a WM_COMMAND message with a BN_CLICKED notification code whenever the button is clicked.
Posted on 2001-09-02 11:58:27 by Soul~Drudge
I'd do it NOPerators way. Less work in the radio button handler (not
that is matters). Also I think it's a bit cleaner... you can call IsDlgButtonChecked
for one of the radio buttons, and depending on the result (cmp/jne)
you can launch either of the dialogs.
Posted on 2001-09-02 13:21:49 by f0dder