2 separate groups of radio buttons in the same form WINAPI (No MFC)
Asked Answered
L

2

2

I am looking to create 2 separate groups of radio buttons in a dialog box in my program but I cant quite get it to work correctly. As I understand it I need to be using the Group property but I am not getting the desired result.

I have 2 radio buttons that I wish the user to select 1 of, then a separate group of 6 which the user also selects 1 of.

Lorileelorilyn answered 23/5, 2012 at 8:56 Comment(1)
Exactly how are you using the WS_GROUP style? Post code. What result are you actually getting?Breeding
L
2

I have Solved the problem myself. Simply setting 1 of the radio buttons to true and leaving the rest false gave me the desired result. I didn't do this in code. I was just using the the properties view

Lorileelorilyn answered 30/5, 2012 at 9:52 Comment(0)
T
-1

For instance, you have two groups of radio buttons. In order to make the first group you need write

WS_GROUP | WS_TABSTOP

The first group:

CreateWindowEx(bla_bla, bla_bla, bla_bla, WS_GROUP | WS_TABSTOP, bla, bla, bla, bla, bla,bla,bla,bla);

CreateWindowEx(); one more radio button which refers to the first group;(notice without WS_GROUP | WS_TABSTOP !!!!)

CreateWindowEx();one more radio button which refers to the first group;(notice without WS_GROUP | WS_TABSTOP !!!!)

Tyro answered 23/9, 2013 at 20:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.