Solved

Radio Buttons

Posted on 1998-06-24
4
216 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
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
galkin earned 100 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 107
unable to delete all specified values regedit 38 155
sumNumber challenge 16 99
Line meaning 9 77
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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 demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now