Melon00
03-03-2006, 08:29 PM
I have an app with a bunch of radio buttons and an edit box. I would like to make one of the radio buttons already selected with the focus set on my edit box when the app opens, i.e. set my defaults upon initializing my app.
I have no problem with setting my default selected radio button. The problem lies within setting the focus to my edit box. I have attempted to put
m_EditBoxVariable.SetFocus();
UpdateData(FALSE);
in several places of my code, such as the OnInitDialog() of the window class and in the member function that gets called when my default radio button gets selected ( OnDefaultRadioSelect() ). The latter works as long as I "click" on my default radio button, but I have to click on it. It doesn't just pop up with the cursor blinking in the edit box. Any thoughts would be greatly appreciated.
I have no problem with setting my default selected radio button. The problem lies within setting the focus to my edit box. I have attempted to put
m_EditBoxVariable.SetFocus();
UpdateData(FALSE);
in several places of my code, such as the OnInitDialog() of the window class and in the member function that gets called when my default radio button gets selected ( OnDefaultRadioSelect() ). The latter works as long as I "click" on my default radio button, but I have to click on it. It doesn't just pop up with the cursor blinking in the edit box. Any thoughts would be greatly appreciated.