|
-
April 19th, 1999, 01:48 PM
#1
Setting Focus or Active?
I am curious how I would make a combobox in a tool/dialog bar active when program is to a complete start up state, in other words after all are created and basic initializations are done, I would like to set a specifice control as the active one?
My initial thoughts proved to unsucsessful so I am looking for help out here.
Thanks in advance
Shawn
[email protected]
-
April 19th, 1999, 02:37 PM
#2
Re: Setting Focus or Active?
Hi ,
use CWnd::SetFocus .
Good Luck.
Yash.
-
April 19th, 1999, 02:53 PM
#3
Re: Setting Focus or Active?
but where? every place I have tried doesn't produce desired result.
-
April 19th, 1999, 02:59 PM
#4
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.
-
April 19th, 1999, 06:57 PM
#5
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
-
April 19th, 1999, 10:32 PM
#6
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.
-
April 20th, 1999, 01:16 PM
#7
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]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|