Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - WS_EX_CONTROLPARENT on the task panel
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

WS_EX_CONTROLPARENT on the task panel

 Post Reply Post Reply
Author
Message
rdhd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 August 2007
Location: United States
Status: Offline
Points: 886
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdhd Quote  Post ReplyReply Direct Link To This Post Topic: WS_EX_CONTROLPARENT on the task panel
    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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


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: 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
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.203 seconds.