-
August 31st, 2009, 08:25 PM
#1
How to let CFrameWnd always and only on top of parent window?
I have a parent window derived from CFrameWnd. When I switch among the tree items in the parent window, I will get a child window which is also derived from CFrameWnd. Current the child window is on top of every window, but this is not I want. It needs to be always but only on top of its parents and its content will be updated when I switch among the tree items in the parent window (thus can't be modal). The following is what I have for now:
m_pChildFrame->Create(NULL, _T("Test"), WS_OVERLAPPEDWINDOW, CRect(0, 0, 200, 150), NULL, NULL, WS_EX_TOPMOST);
I can't use CDialog to do similar thing. Thanks for your advice.
Leo
-
August 31st, 2009, 08:36 PM
#2
Re: How to let CFrameWnd always and only on top of parent window?
Remove the WS_EX_TOPMOST flag, and set the first param to its parent hWnd.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|