Cannot create member variable of radio button...
-
Hi, I have radio buttons in my dialog and want to disable some of them according to the state of other radio buttons. The problem is that it seems impossible to add a member variable for radio buttons in MVC++6! (but check boxes are ok) I basically want to do the following: m_radioButton1.EnableWindow(false); Thanks :)
-
Hi, I have radio buttons in my dialog and want to disable some of them according to the state of other radio buttons. The problem is that it seems impossible to add a member variable for radio buttons in MVC++6! (but check boxes are ok) I basically want to do the following: m_radioButton1.EnableWindow(false); Thanks :)
the Wizard will create only one variable for a radio button group, the one variable contains the "index" of the radio button of the group that is chosen. I think you can add them manually ( preferrable since you'll learn something more ! ) you can always do :
// replace IDC_RADIO_BUTTON1 by your radio button ID ...
CButton* pButton = (CButton*)GetDlgItem( IDC_RADIO_BUTTON1 );
pButton->EnableWindow( FALSE );// or TRUEMax.
-
the Wizard will create only one variable for a radio button group, the one variable contains the "index" of the radio button of the group that is chosen. I think you can add them manually ( preferrable since you'll learn something more ! ) you can always do :
// replace IDC_RADIO_BUTTON1 by your radio button ID ...
CButton* pButton = (CButton*)GetDlgItem( IDC_RADIO_BUTTON1 );
pButton->EnableWindow( FALSE );// or TRUEMax.