Print Page | Close Window

WS_EX_CONTROLPARENT on the task panel

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=13246
Printed Date: 23 November 2024 at 10:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: WS_EX_CONTROLPARENT on the task panel
Posted By: rdhd
Subject: WS_EX_CONTROLPARENT on the task panel
Date Posted: 23 January 2009 at 7:43pm
Should WS_EX_CONTROLPARENT be added to the task panel window?
 
I had lockups where adding that style fixed the lockup. But I now get a lockup if I remove the last group in the task panel. The problem seems to be the style is on the panel at the time CJ calls GetNextDlgTabItem when OnSetFocus is called on the task panel.
 
OnSetFocus is called when the task panel group item destructor runs and it calls ShowWindow(h, SW_HIDE). I assume since I had to make the dialog a child of the panel the OS is setting focus to the panel when the window is hidden (well that and the stack trace.)
 
Microsoft has sent me a rather lengthy explanation of the rules that have to be followed to avoid the lockup and one of them is to never set focus on "a control that has WS_EX_CONTROLPARENT" style on it. I asked if any window counts as a control and the answer is yes.
 
I have currently subclassed the panel to intercept OnSetFocus and route the call directly to the CWnd class.



Replies:
Posted By: Oleg
Date Posted: 26 January 2009 at 2:10am
Hi,
 
It depends on layout. Our Toolbox sample set WS_EX_CONTROLPARENT for MainFrame and Splitter for correct tab order.


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