[comp.windows.ms] Problem With CheckRadioButton

kam@iti.org (Keith A. McNabb) (05/31/91)

I'm having a problem with the CheckRadioButton() function of Windows
3.0.  It takes four parameters -

   1)  Handle of the dialog box
   2)  Resource identifier (int) of the first button in group to turn
       off
   3)  Resource identifier of last button in group to turn off
   4)  Resource identifier of the button to turn on

Suppose I have two buttons, BUTTON_1 and BUTTON_2.  According to the
documentation, I should be able to turn on the second by:

   CheckRadioButton(hDlg, BUTTON_1, BUTTON_1, BUTTON_2);

Well, that doesn't do anything.  So, I tried:

   CheckRadioButton(hDlg, BUTTON_1, BUTTON_2, BUTTON_2);

That's not the way it's shown in Microsoft's SDK documentation, but
it does work the first time.  After that I get random results; seems
to work in some cases, not work in others.

If I just send "check" and "uncheck" messages, the way it was done in
Windows 2.0, everything seems to work fine.  But the new
CheckRadioButton function is supposed to take care of all that, saving
you a lot of work

Has anyone run into this?  Any advice appreciated.

Keith
kam@iti.org