Re: focus problem

"Nikos Bozinis" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <[email protected]>
(reviving an age old thread...Message #8295)


--- In [email protected], "Roger Headrick" <lilsroro@...> wrote:
>
> --- In [email protected], "jobbewtl" <misc@j...> wrote:
> > 
> > I'm coding a wtl application that has a form view 
> > The problem is: if a control on this form view is in focus (i.e. 
> the
> > cursor is in an edit control!) and the user switches to another
> > program and then switches back, the control will lose focus.
> > 
> 
> Hi Jobbe,
> 
> When using a modeless child dialog, I believe you basically have to 
> do-it-yourself.
> 
> Here is what I do --
>  ....
> [manually monitor which dialog control was last focused and 
> restoring it when the dialog is activated/focused]


I've stumbled on the same dialog focus problem when using a CDialogImpl-based (form) view inside a splitter within the main frame window. The dialog control that was last in focus doesn't get restored when you switch to a different application and back, instead only the first control gets the focus

one way around this focus problem is to manually monitor the active item as per Roger's recommendation. However I have noticed that normal (modal) dialog windows remember their last focus when used in this fashion, without any manual labor!

any ideas?
thanks
nikos




------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/wtl/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/wtl/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.