Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSet active a radio button as default Pin
alvarillo5-May-05 7:24
alvarillo5-May-05 7:24 
GeneralRe: Set active a radio button as default Pin
David Crow5-May-05 7:43
David Crow5-May-05 7:43 
GeneralRe: Set active a radio button as default Pin
alvarillo5-May-05 8:04
alvarillo5-May-05 8:04 
GeneralRe: Set active a radio button as default Pin
David Crow5-May-05 8:07
David Crow5-May-05 8:07 
GeneralRe: Set active a radio button as default Pin
alvarillo5-May-05 8:16
alvarillo5-May-05 8:16 
GeneralRe: Set active a radio button as default Pin
David Crow5-May-05 9:24
David Crow5-May-05 9:24 
GeneralRe: Set active a radio button as default Pin
ddmcr5-May-05 8:47
ddmcr5-May-05 8:47 
GeneralRe: Set active a radio button as default Pin
ricecake5-May-05 9:42
ricecake5-May-05 9:42 
The way I did it:

I have set a control variable (I'm not sure if this is the right terminology for it). For example, in my app (LNP) I have a list of frequencies that a user may choose using a radio button. I have declared an int m_Freq. Then, I tell it to associate the radio with m_Freq (IDC_FREQ_18_0 corresponds to the ID of the first frequency in the list, 18.0):

void LNPDlg::DoDataExchange(CDataExchange* pDX)<br />
{<br />
    /* ... */<br />
    DDX_Radio(pDX, IDC_FREQ_18_0, m_Freq);<br />
}


Then in my constructor, I set m_Freq to whichever value I want chosen at startup, i.e., 0 corresponds to the first entry (18.0), 1 would correspond with the next value, etc.

--
Marcus Kwok
GeneralRe: Set active a radio button as default Pin
David Crow5-May-05 9:49
David Crow5-May-05 9:49 
GeneralLoad webpage using url in C Pin
Member 7785435-May-05 7:22
Member 7785435-May-05 7:22 
GeneralRe: Load webpage using url in C Pin
includeh105-May-05 8:03
includeh105-May-05 8:03 
GeneralRe: Load webpage using url in C Pin
ThatsAlok5-May-05 20:52
ThatsAlok5-May-05 20:52 
GeneralMethods Pin
javi_jmc5-May-05 6:28
javi_jmc5-May-05 6:28 
GeneralRe: Methods Pin
Ansari A. Halim5-May-05 21:34
Ansari A. Halim5-May-05 21:34 
GeneralLIBC conflics with MySQL++ Pin
_kane_5-May-05 6:20
_kane_5-May-05 6:20 
GeneralRe: LIBC conflics with MySQL++ Pin
Mike Dimmick5-May-05 17:57
Mike Dimmick5-May-05 17:57 
GeneralRe: LIBC conflics with MySQL++ Pin
_kane_5-May-05 19:39
_kane_5-May-05 19:39 
GeneralCreateProcess() with XP Pin
includeh105-May-05 5:19
includeh105-May-05 5:19 
GeneralRe: CreateProcess() with XP Pin
David Crow5-May-05 6:31
David Crow5-May-05 6:31 
GeneralRe: CreateProcess() with XP Pin
includeh105-May-05 7:31
includeh105-May-05 7:31 
GeneralRe: CreateProcess() with XP Pin
includeh105-May-05 7:50
includeh105-May-05 7:50 
GeneralRe: CreateProcess() with XP Pin
David Crow5-May-05 8:01
David Crow5-May-05 8:01 
GeneralOutlook Express programming Pin
RicercaSviluppo5-May-05 4:35
RicercaSviluppo5-May-05 4:35 
Generala Pin
Anonymous5-May-05 4:28
Anonymous5-May-05 4:28 
GeneralRe: a Pin
Larry J. Siddens5-May-05 4:46
Larry J. Siddens5-May-05 4:46 

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.