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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Checkbox groups? MFC VC++ 6.0

Checkbox groups? MFC VC++ 6.0

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
4 Posts 3 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
    a3gupta
    wrote on last edited by
    #1

    Hello, I am writing a dialog based application in VC++ 6.0. In one of my dialog box, The check boxes aren't grouped right. I have four checkboxes and they need to be in groups of two. So If I check one box in one of the group the other one from the same group should be unchecked. But, as of now, you can check all 4 together at the same time, or with sometimes, the wrong button gets unchecked etc. This may be a basic question, but I will will appreciate if you could help me with this problem. Thanks! Sincerely, Anjum Gupta.

    R H A 3 Replies Last reply
    0
    • A a3gupta

      Hello, I am writing a dialog based application in VC++ 6.0. In one of my dialog box, The check boxes aren't grouped right. I have four checkboxes and they need to be in groups of two. So If I check one box in one of the group the other one from the same group should be unchecked. But, as of now, you can check all 4 together at the same time, or with sometimes, the wrong button gets unchecked etc. This may be a basic question, but I will will appreciate if you could help me with this problem. Thanks! Sincerely, Anjum Gupta.

      R Offline
      R Offline
      Rage
      wrote on last edited by
      #2

      You should use Radio buttons instead of checkboxes, otherwise, you'll have to do the mutual exclusive thing by hand. ~RaGE();

      1 Reply Last reply
      0
      • A a3gupta

        Hello, I am writing a dialog based application in VC++ 6.0. In one of my dialog box, The check boxes aren't grouped right. I have four checkboxes and they need to be in groups of two. So If I check one box in one of the group the other one from the same group should be unchecked. But, as of now, you can check all 4 together at the same time, or with sometimes, the wrong button gets unchecked etc. This may be a basic question, but I will will appreciate if you could help me with this problem. Thanks! Sincerely, Anjum Gupta.

        H Offline
        H Offline
        HENDRIK R
        wrote on last edited by
        #3

        If you want to invent groups, the first member of your group has to be marked as 'group' in it's corresponding properties. In your case that means that 2 radio boxes are assigned to be a group and the other 2 not. Beside that, I think the elements that belong to a group have to follow the 'group leader' (your element marked as group) in the tab order. Sh*t ... just realized that you wanted to know sth. about check boxes .... so the post of my predecessor seems to be valid...:-O

        1 Reply Last reply
        0
        • A a3gupta

          Hello, I am writing a dialog based application in VC++ 6.0. In one of my dialog box, The check boxes aren't grouped right. I have four checkboxes and they need to be in groups of two. So If I check one box in one of the group the other one from the same group should be unchecked. But, as of now, you can check all 4 together at the same time, or with sometimes, the wrong button gets unchecked etc. This may be a basic question, but I will will appreciate if you could help me with this problem. Thanks! Sincerely, Anjum Gupta.

          A Offline
          A Offline
          a3gupta
          wrote on last edited by
          #4

          Thanks to both of you for your responses. I am using radio buttons and that Tab ordering tip was very helpful. It is working now! :-) Gupta.

          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