Positioning CDialogBar Objects..
Mihir Dalal -- m_dalal@ECE.concordia.CA Tuesday, March 04, 1997 Environment: MSVC 1.52, Win95 Hi, I know this is quite offbeats as compared to normal programming practices, but it is just that I need to do it in my SDI complaint form view based application. Just wondering whether it is feasible in Visual C++ considering the fact that it is feasible in Visual Basic. I want to create CDialogBar objects positioned on the application interface something like this: _________________________________________ |-----------------------------------------|-> Caption |_________________________________________|-> Menus | | | |-> CDialogBar |_________________________________________| | | | |-> CFormView | | | | |_________________________________________| | |-> Another CDialogBar |-----------------------------------------| Object | | | | | | | | | | | | ----------------------------------------- I know how to create CDialogBar objects on the top/left/right/bottom of the form view, but I just don't know how can a CDialogBar be positioned in the middle of the form view (either vertically or horizontally). Any help appreciated. Mihir. _________________________________________________________________________ Mihir Dalal, M.Engg. (Electrical) Student Department of Electrical and Computer Engineering Concordia University, Montreal, Canada http://www.ECE.Concordia.CA/~m_dalal/addr.html
Dave Lorde -- dlorde@cix.compulink.co.uk Wednesday, March 05, 1997 In-Reply-To:As far as I know, you can only position an undocked dialog bar somewhere other than the top, bottom, left, or right frame docking areas. This, of course, means that it will display a mini-title bar. If this is what you want, just call the CFrameWnd FloatControlBar() method which allows you to specify the top left co-ordinate of the dialog bar. The only other way I can think of is to use two seperate docking frames containing views displaying half the 'main view' each, and dock the dialog bar to the bottom of the top frame, or the top of the bottom frame... I would consider this a last resort though! Dave
Ben Burnett -- benner@supernet.ab.ca Saturday, March 08, 1997 Mihir, maybe this will work: Create two views with the same document ( like using a spliter window ) the top view shows the top part of the doc while the bottom shows the bottom of the doc. Now when the user scrolls on the to view have the bottom view scroll aswell ( using an offset off course ) and display what would be at the bottom. like this: |-----------------------------------------|-> Caption |_______________________________|-> Menus | | | |-> CDialogBar |_______________________________| | - start on line one | | |-> CFormView | | ****** | | |_______________________________| | |-> Another CDialogBar |-----------------------------------------| Object | - starts on line 1 + offset | | - offset found by getting parent window | | size and considering how much space | | the ctrlbar takes up |-> CFormView (part 2) | | | | ----------------------------------------- hope this helps a little
Become an MFC-L member | Вернуться в корень Архива |