WS_EX_CONTROLPARENT on the task panel |
Post Reply |
Author | |
rdhd
Senior Member Joined: 13 August 2007 Location: United States Status: Offline Points: 886 |
Post Options
Thanks(0)
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.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |