Thread: how to group buttons

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    50

    how to group buttons

    I'm wondering how to group radiobuttons. MSDN mentions it but doesn't help with the code.

  2. #2
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    strange ... 'Programming Windows' have very little info on radio buttons and doesn't mention how they are placed into groups, though my Java book does ...

  3. #3
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    try the using the

    BS_AUTORADIOBUTTON

    or

    in dialog editor

    "auto"

    style
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  4. #4
    Registered User
    Join Date
    May 2002
    Posts
    50
    Well but that only lets you create one group of buttons, ie. one group of autoradio buttons.

    What if I want one dialog that has one set of buttons to control one thing, and another set of autoradiobuttons to control a second thing. I would need two groups so that the "auto" doesn't uncheck the first group when I select an item from the second.

    I mean I guess the hard way to do this is just create two boxes that LOOK different but are actually the same group, use NON auto buttons and use WinProc to check for which buttons are checked, but then you have to check each and every one whenever you change one, and make sure you don't change the others... could become a monstrous job.

    Was just wondering if there was an easier way to do it.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    >> could become a monstrous job.
    That is what i did in my program, but i used checkboxes instead of radio buttons
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  6. #6
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    If using the resource editor try playing with the TAB order. Introducing another ctrl inbetween the radio buttons may allow different groups.
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 0
    Last Post: 11-08-2005, 02:28 AM
  2. radio buttons in group box
    By COBOL2C++ in forum Windows Programming
    Replies: 3
    Last Post: 09-15-2003, 05:26 PM
  3. ray casting
    By lambs4 in forum Game Programming
    Replies: 62
    Last Post: 01-09-2003, 06:57 PM
  4. Group radio buttons
    By ski6ski in forum Windows Programming
    Replies: 0
    Last Post: 09-01-2001, 09:19 AM