Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Pane loses focus after dialog shown
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pane loses focus after dialog shown

 Post Reply Post Reply
Author
Message
Maye Johnson View Drop Down
Groupie
Groupie


Joined: 16 October 2004
Status: Offline
Points: 40
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maye Johnson Quote  Post ReplyReply Direct Link To This Post Topic: Pane loses focus after dialog shown
    Posted: 24 November 2004 at 1:09am
I have a pane that has a toolbar.  The pane has focus, and I click a button on the toolbar to make a dialog appear.  When the dialog is dismissed, the pane loses focus.  How do I prevent the pane from losing focus?

Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2004 at 2:39am

It is MFC feature it set Focus to Active View after OnActivate event (see source of

void CView::OnActivateView)

 

so you can back focus manually:

...

dlg.DoModal()

SetFocus(this);

...

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.