Click here to Skip to main content
15,909,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalone more question Pin
4apai10-Aug-04 3:12
4apai10-Aug-04 3:12 
GeneralRe: one more question Pin
Antti Keskinen10-Aug-04 9:41
Antti Keskinen10-Aug-04 9:41 
GeneralRe: one more question Pin
4apai10-Aug-04 22:17
4apai10-Aug-04 22:17 
GeneralRe: one more question Pin
wangycol6-Feb-12 21:11
wangycol6-Feb-12 21:11 
GeneralRe: MSTSCAX ActiveX Ctrl Pin
lokimeg12-May-09 21:22
lokimeg12-May-09 21:22 
GeneralRe: MSTSCAX ActiveX Ctrl Pin
Antti Keskinen13-May-09 4:45
Antti Keskinen13-May-09 4:45 
QuestionIs there a Multi-radio button control like the CodeProject Article Voting Control? Pin
Stone Free9-Aug-04 23:45
Stone Free9-Aug-04 23:45 
AnswerRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
Antti Keskinen10-Aug-04 0:18
Antti Keskinen10-Aug-04 0:18 
Are you talking about having a row of radio buttons, from which the user can select one ?

Then the answer is control grouping. Take any dialog template. Then place the row of radio buttons there. Now, go to the Tab Order option, and make sure that the radio buttons are set into an ascending order so that the first radio button has and index, say, 6, the next is 7 and so on, until the end of the row. Then go to the properties of the first radio button, and check the option 'Group'. All other buttons must NOT have the Group option set.

The Group option works so that the first control in the tab order that has the Group option set becomes the first member of the group. All adjacent controls (in the tab order) of similar type belong to the same group until a) another similar control with the group option set is met or b) a different type of control is met.

To access this group code-wise, add a member variable to the first radio button control, and take it's value. The value returned is a zero-based index on the radio button that is selected. Like, it's 0 if the first one is selected, 1 if the second and so on..

For a good example, go here[^].

Remember that the radio buttons can be vertically, horizontally or diagonally placed on the dialog. The tab order determines how they are grouped, not their physical position.

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
Stone Free10-Aug-04 0:32
Stone Free10-Aug-04 0:32 
GeneralRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
David Crow10-Aug-04 3:10
David Crow10-Aug-04 3:10 
GeneralRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
Stone Free10-Aug-04 3:15
Stone Free10-Aug-04 3:15 
GeneralRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
David Crow10-Aug-04 4:11
David Crow10-Aug-04 4:11 
GeneralRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
Stone Free10-Aug-04 4:26
Stone Free10-Aug-04 4:26 
GeneralRe: Is there a Multi-radio button control like the CodeProject Article Voting Control? Pin
David Crow10-Aug-04 4:32
David Crow10-Aug-04 4:32 
QuestionHow to change static text on a property page clicking on command button.? Pin
Rajesh_K_Sharma9-Aug-04 23:04
Rajesh_K_Sharma9-Aug-04 23:04 
AnswerRe: How to change static text on a property page clicking on command button.? Pin
V.10-Aug-04 0:08
professionalV.10-Aug-04 0:08 
Generaluse ProgressCtrl Pin
fatidarya9-Aug-04 22:30
fatidarya9-Aug-04 22:30 
GeneralRe: use ProgressCtrl Pin
Antti Keskinen10-Aug-04 0:23
Antti Keskinen10-Aug-04 0:23 
GeneralRe: use ProgressCtrl Pin
David Crow10-Aug-04 3:18
David Crow10-Aug-04 3:18 
GeneralImage processing Pin
nyquisttt9-Aug-04 22:29
nyquisttt9-Aug-04 22:29 
GeneralRe: Image processing Pin
*Dreamz10-Aug-04 3:13
*Dreamz10-Aug-04 3:13 
GeneralCWebBrowser Help with Navigate function Pin
ramingo9-Aug-04 22:11
ramingo9-Aug-04 22:11 
GeneralTristate checkbox in tree Pin
alfa_aquila9-Aug-04 22:10
alfa_aquila9-Aug-04 22:10 
QuestionMemory leaks with DAO? Pin
george ivanov9-Aug-04 22:08
george ivanov9-Aug-04 22:08 
GeneralProblem in FILETIME Pin
SSD_9-Aug-04 21:36
SSD_9-Aug-04 21:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.