Link to home
Start Free TrialLog in
Avatar of deterep
deterep

asked on

Visual C++ Class Wizard will not treat radio butons properly.

Title: Visual C++ Class Wizard will not treat radio buttons properly.

Value: 200 points

Visual C++ 4.0, under Windows 95

Create a dialog based project and modify the default language from English(US) to English(UK) (necessary for me).
Include a selection of controls including at least one radio button.
Activate Class Wizard/Member Variables.  The list of Control IDs does NOT include that for the radio button(s).  Why.
(Teach yourself Viaual C++ in 21 days, Gurewich and Gurewich chapter 7, assumes no problems here.)

I have tried Save all files - no good.
I need an expert who has met or can reproduce the problem - and solve it.  Please - no guesses.

Ed Peters
Avatar of md041797
md041797

There was some discussion about this in comp.lang.c++.
Radio buttons do not show up in the variable list, even for English (US). I do not know why MS choose to do this, but this was done on purpose.

I believe the reason for this might be that rather than a variable for each radio button, you would want a single variable for a group of radio buttons, which class wizard is not really set up to handle in 4.x.

The work around, at least the one which I have used is the past, is to add the variable my self, and respond to the messages for the radio buttons myself.
Avatar of deterep

ASKER

As a beginner working through "Teach yourself Visual C++ in 21 days", I need to know how to get round the problem which the book does not even acknowledge.  lwiding's answer does not tell me how to do that.
ASKER CERTIFIED SOLUTION
Avatar of sunnyltd
sunnyltd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of deterep

ASKER

Excellent.  Thank you.  The book was clear after all.  It was my mistake.  Anyway, thanks.