How to specify the selected default Radiobutton in MFC?

There are two radio exchanges in my dialog box. I set up the order of the cabbage correctly and enabled the group property on one of them and added a member variable that I can read.

Now I'm wondering: how can I choose the default option? Right now, when a dialog is being created, no visual selection is made. Doing m_membervariable = 1; compiles, but it also does not select a radio object. How can i do this?

I checked tutorials like http://www.functionx.com/visualc/controls/radiobutton.htm and http://www.cpp-tutor.de/mfc/mfc/kap8/lektion2.htm but they seem to be cheating on this .

Regards Mark

+3
source share
3
+2
0

You must define the range of available values ​​for your radio buttons in the row table. So, if you have two controls, you specify 0 and 1, so the first value for m_membervariable is for your first control, and the second for the second.

-1
source

All Articles