Solved

Radio Buttons

Posted on 1998-06-24
4
222 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 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

617 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