Re: Setting Focus or Active?
Hi ,
use CWnd::SetFocus .
Good Luck.
Yash.
Re: Setting Focus or Active?
but where? every place I have tried doesn't produce desired result.
Re: Setting Focus or Active?
Hi,
You have to put the call in the OnInitDialog member of your dialog class. Also, make sure to return FALSE, to indicate that you have set the focus to a control.
Daniel.
Re: Setting Focus or Active?
When you create the control remember its window pointer
and then at the end of starting the program POST yourself a message
and in that message handler, set focus to the control
Sally
Re: Setting Focus or Active?
put it at the end of the oninitdilaog initially. But take care that after this if U set any modify any other controls , ur set focus is lost .Can U give ur piece of code so that someone can suggest better ???
Yash.
Re: Setting Focus or Active?
in the main frame I create a CSizingControlBar(code I got from docking window section of this site) derived class, where in the MainFrame::OnCreate I activate.
In that derived class I have a CComboBox which I create and activate in the derived class' OnCreate(). It is this ComboBox I would like to set active after any view is loaded or created of an MDI architecture.
Any Suggestions,
Shawn
[email protected]