Article View: comp.os.ms-windows.programmer.tools.mfc
Article #30Re: Q: Dockable windows with tabs in MFC?
From: Bill Foust
Date: Wed, 17 Jan 1996 14:50
Date: Wed, 17 Jan 1996 14:50
86 lines
4277 bytes
4277 bytes
In article <30F65AD2.6702@us.oracle.com>, nscroggi@us.oracle.com says... > >Scott Libert wrote: >> >> 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. > > >However, I still don't understand how you oriented the >tabs so that they were on the bottom (rotated 180 degrees) >ala Excel worksheet tabs. Would someone explain? Thanks. > >--Norm Today while having two copies of VC up at the same time the resources got messed up or something and the tabs at the bottom of the output window got messed up. instead of the familiar tabs borders, I got pieces of the red X bitmap! Its seems to me then, that the tabs on the output window are really a static toolbar(ie non dockable so you can't move it) with statics and bitmaps in between. The bitmaps are altered when the statics get a click message to create the illusion of having the tabs change. The text of the tabs may be buttons with the borders turned off or something if statics can't be clicked. The fonts also changed when clicked. In any case its a nice little trick, but a shitload of work because they aren't using a standard HScroller. The ScrollBars must ALSO be part of the toolbar and so they must be handling the scrolling themselves. Hope that is of some help to ya. Bill
Technical Details
Message-ID:
<4dj2bn$969@cnn.softart.com>Path:
arc1-ca.pugleaf.net!cnn.softart.com!newsReferences:
<4crfes$2qu@nms.telepost.no> <30F25A5E.31EC@us.oracle.com> <4d0f92$5v3@zeus.intellinet.com> <4d40q3$99o@maureen.teleport.com> <30F65AD2.6702@us.oracle.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cnn.softart.com!news From: bffoust@softart.com (Bill Foust) Newsgroups: comp.os.ms-windows.programmer.tools.mfc,comp.lang.c++ Subject: Re: Q: Dockable windows with tabs in MFC? Date: 17 Jan 1996 14:50:31 GMT Organization: Software Artistry Message-ID: <4dj2bn$969@cnn.softart.com> References: <4crfes$2qu@nms.telepost.no> <30F25A5E.31EC@us.oracle.com> <4d0f92$5v3@zeus.intellinet.com> <4d40q3$99o@maureen.teleport.com> <30F65AD2.6702@us.oracle.com> NNTP-Posting-Host: bffoust.softart.com Mime-Version: 1.0 X-Newsreader: WinVN 0.99.2