Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assertion error caused by DDX_Radio

Status
Not open for further replies.

reneb

Programmer
Aug 8, 2000
43
US
I tried setting the data exchange in a dialogue box that has a radio button using DDX_Radio:
DDX_Radio(pDX, IDC_Res01, restest1);
This statement caused an assertion at runtime but no errors at compile time. I don't understand why if it is the normal routine for doing Data Exchange. Is there a routine for handleling or using radio buttons? Must I create a member of type control for it? I have the Radio Button in the Dialogue box but I can't get it to work. Please show me a routine. Thank you so much in advance.
 
Dear reneb,

When you place radio controls into a dialog in the resource editor, check the 'Group' property for the first radio button in the group. Then make sure that all the rest of the radio buttons in the group have sequential tab order numbers from the first one.

Now open ClassWizard and go to the member varibles tab. Only the first radio control shows up in the control list. Select it and 'Add' a member variable of type Category 'Value' and type of 'int'. After clicking on OK the ClassWizard dialog should display "radio control group transfer" under the Control ID's list when the radio control is selected in the list box.

Now that dialog member variable will contain the value 0 thru n denoting which radio button in the group is selected after you call the dialog's UpdateData() member function.

Hope this helps
-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top