Article View: comp.os.ms-windows.programmer.tools.mfc
Article #28Re: Q: Dockable windows with tabs in MFC?
From: Scott Libert
Date: Thu, 11 Jan 1996 21:52
Date: Thu, 11 Jan 1996 21:52
58 lines
2861 bytes
2861 bytes
RobertC@ProDentec.com (Robert Christian) wrote: >Norman Scroggins <nscroggi@us.oracle.com> wrote: >>Stian Barkbu wrote: >>> >>> I am trying to create a dockable property sheet (tabbed >>> dialog), much like the project workspace in MSVC++ 4.0. Is >>> this possible at all? >>> >>> I have managed to create a tabbed dialog box using the >>> CPropertySheet and CPropertyPage classes (or a TabCtrl), and I >>> can get a dockable window using CDialogBar. But, a dockable >>> window with a tab control seems impossible ( or, at least none >>> of my efforts have been successful so far). >>> Can anyone help me with this one? >>> >>> Thanks. >>> >>> Stian >>> snba@sesam.dnv.no >>I myself have been trying to get some help doing this--with >>the added twist of having the tabs oriented on the bottom >>instead of the top. Let's keep each other updated on a >>solution. Thanks. >>--Norm >I'm not certain, but it appears to me that Microsoft is actually >performing somewhat of a trick. I don't think they are using property >pages, but rather a tab control placed under a tree control. When you >select a tab, they hide one tree control and display another...maybe. >Robert Christian Just wanted to say I agree with Roger; I have implemented something just like that. I have a CView-derived object which creates a CTabCtrl as as a child, then creates a CTreeCtrl as a child of the tab control. And it all works. The next step I am working on right now is to have the parent window be a CControlBar-derived class instead of CView. I see no problem here. A bigger problem, however, is how to get the "splitter" functionality to size the CControlBar-derived object. Since I am using MDI, I can't use CSplitterWnd in the main frame, due to the assumptions made in the GetParentFrane() method of CMDIChildWnd. My tack at this point is to implement special WM_NCPAINT handling to draw what looks like a spliitter bar and add WM_NCHITTEST, WM_NCLBUTTONDOWN & WM_NCMOUSEMOVE handling to show the "drag splitter" cursor and resize the window. It seems once this is done the only thing left to do to perform the magic that MS does of changing the control bar window from/to a mdi child window is to change the parentage of the window.via SetParent(). - Scott L.
Technical Details
Message-ID:
<4d40q3$99o@maureen.teleport.com>Path:
arc1-ca.pugleaf.net!nntp.teleport.com!usenetReferences:
<4crfes$2qu@nms.telepost.no> <30F25A5E.31EC@us.oracle.com> <4d0f92$5v3@zeus.intellinet.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nntp.teleport.com!usenet From: slibert@teleport.com (Scott Libert) Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++ Subject: Re: Q: Dockable windows with tabs in MFC? Date: Thu, 11 Jan 1996 21:52:50 GMT Organization: Teleport - Portland's Public Access (503) 220-1016 Message-ID: <4d40q3$99o@maureen.teleport.com> References: <4crfes$2qu@nms.telepost.no> <30F25A5E.31EC@us.oracle.com> <4d0f92$5v3@zeus.intellinet.com> NNTP-Posting-Host: ip-pdx06-21.teleport.com X-Newsreader: Forte Free Agent 1.0.82