Question

I have 2 radio button under a group box and i made first one group as true. but when i am adding radio button variable the it showing message "Failed to return new code element possibly a syntax error", what would be the reason?

Was it helpful?

Solution

Delete the Class Wizard file (.clw) and the Intellisense file (.ncb) file from your solution directory and try again.

OTHER TIPS

You need to have only one variable for your data and one for your control for your grouped Controls:

int m_RBData;
CRadio m_RBControl;

Then you need to group all ID Controls within the linked function like this:

ON_CONTROL_RANGE(BN_CLICKED,IDC_RB,IDC_RB3,OnClickRb)

You also need to add reference to String Table:

1R__C 0,1,2 in your first ID (IDC_RB).

Now your data variable, takes the values 0,1 or 2 whenever you click the first, the second or the third radio button respectively.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top