Re: Re: focus problem

"Jim Barry" <[email protected]>
Newsgroups gmane.comp.windows.wtl
Message-ID <A62C5C21EFCA4FBFA87232453E4BDCA2@TTX>
Nikos Bozinis wrote:
> 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    

The dialog manager saves and restores the focus in its WM_ACTIVATE processing, so it doesn't work for child dialogs.

> 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?

Just forward WM_ACTIVATE to the child dialog :-)

-- 
Jim Barry, Microsoft MVP


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

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.