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. Immediate help required for RADIO BUTTONS

Immediate help required for RADIO BUTTONS

Scheduled Pinned Locked Moved C / C++ / MFC
help
4 Posts 4 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    hi i want to use three radio buttons i.e radio1, radio2 and radio3 in a group box. As i click radio1 and then i press a button, a message passed in this method AfxMessageBox("hello"); must be appear, plz tell me the logic.

    I M 2 Replies Last reply
    0
    • A Anonymous

      hi i want to use three radio buttons i.e radio1, radio2 and radio3 in a group box. As i click radio1 and then i press a button, a message passed in this method AfxMessageBox("hello"); must be appear, plz tell me the logic.

      I Offline
      I Offline
      imsniper
      wrote on last edited by
      #2

      please make more clear what you want

      1 Reply Last reply
      0
      • A Anonymous

        hi i want to use three radio buttons i.e radio1, radio2 and radio3 in a group box. As i click radio1 and then i press a button, a message passed in this method AfxMessageBox("hello"); must be appear, plz tell me the logic.

        M Offline
        M Offline
        Michael P Butler
        wrote on last edited by
        #3

        CButton::GetCheck will give you the state of the radio button. BN_CLICKED Notification will tell you when a button has been clicked. Michael 'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879

        J 1 Reply Last reply
        0
        • M Michael P Butler

          CButton::GetCheck will give you the state of the radio button. BN_CLICKED Notification will tell you when a button has been clicked. Michael 'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879

          J Offline
          J Offline
          JensB
          wrote on last edited by
          #4

          yes handle the BN_CLICKED message with something like this: void CMyClass::OnClickMyButton() //just example { if ( ((CButton*)GetDlgItem(IDC_RADIO1))->GetCheck() ) { AfxMessageBox("radio1 checked"); } else { //check radio button 2 & 3 } }

          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