Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Radio Buttons

Posted on 1998-06-24
4
Medium Priority
?
223 Views
Last Modified: 2013-11-20
I have a group of buttons in a dialog, as well as a few text fields.  I have the need to update the dialog box
inside my Dialog class.   To update the text fields, I make this call: m_text.CWnd::SetWindowText(text) and it works great.  But I am unable to update the group of  radio buttons. I have tried: m_airid.CWnd:CheckRadioButton(0,5,4)...with 0 being the first button in the group, 5 being the last, and 4 being the one I want checked off?   Any idea why this won't work.   FYI, m_airid is the first button in the group and is the only button declared as a member variable of type CButton.  In properties, it is selected as group, while the other 5 buttons are not.

Any ideas???

Thanks!!
0
Comment
Question by:smithc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 300 total points
ID: 1318380
CheckRadioButton takes three IDs, first argument ID of the first button in group, second - ID of the last button in group, third ID of the button to check. Also be sure your ridio buttons are in group. It means the first button must have group style. The following button must be in tab order.
0
 

Author Comment

by:smithc
ID: 1318381
Thanks.   When you say argument, I assume you mean 0 for the first one and 5 for the
last one...in a six button group. I am doing this already.....The tab order is also correct?
Any thing else to look for ?

Thanks again.
0
 
LVL 7

Expert Comment

by:galkin
ID: 1318382
No when I mean arguments I meand correct buttons IDs, for instance ID_FIST_RADIO, ID_SECOND_RADIO etc.
0
 

Author Comment

by:smithc
ID: 1318383
IT didn't seem to work.  I jsut went around it, and used CButton::SetCheck...and handled each button in the group myself.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question