Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Cannot create member variable of radio button...

Cannot create member variable of radio button...

Scheduled Pinned Locked Moved C / C++ / MFC
c++asp-netarchitecturehelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mr Freeze
    wrote on last edited by
    #1

    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 :)

    M 1 Reply Last reply
    0
    • M Mr Freeze

      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 :)

      M Offline
      M Offline
      Maximilien
      wrote on last edited by
      #2

      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 TRUE

      Max.

      M 1 Reply Last reply
      0
      • M Maximilien

        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 TRUE

        Max.

        M Offline
        M Offline
        Mr Freeze
        wrote on last edited by
        #3

        Thank you a lot Max :)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups