Print Page | Close Window

Pane loses focus after dialog shown

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1448
Printed Date: 07 November 2025 at 3:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Pane loses focus after dialog shown
Posted By: Maye Johnson
Subject: Pane loses focus after dialog shown
Date 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?




Replies:
Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net