Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to let CFrameWnd always and only on top of parent window?

3 views
Skip to first unread message

Leo

unread,
Aug 31, 2009, 9:21:23 PM8/31/09
to
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

Scot T Brennecke

unread,
Sep 1, 2009, 2:58:12 AM9/1/09
to

It's not clear what exactly you're trying to accomplish or what the problem is that you're experiencing. I suspect you have chosen
a design that is not as easily adapted to the MFC doc/view architecture. There's probably an easier way to accomplish what you
want, if you'll be a little more explicit. I'm envisioning you might want a splitter window, perhaps some tabs, or something along
those lines. You haven't mentioned using a view, and I'll bet some of your answer will lie in using one.

0 new messages