Dockview window5/29/2023 ![]() ![]() Still it is a common feature in Microsoft applications and some people like it (or at least expect to see it), so I'll be adding this feature to Win32 in due course. This might sound like heresy, but in the past I've found it more of an annoyance rather than a desirable feature. To be honest, I've never been a big fan of toolbar undocking. Either that or I'll do away with the rebar control entirly and come up with a home grown control that does something similar (MFC does this). The CDockable object containing the toolbar will need to co-operate with the rebar control to add and remove rebar bands as appropriate. This will not be as simple as adding MDI docking support. We add MDI children in the usual way (it might make sense to add them maximised).įuture versions of Win32 will include a tabbed dockable view with a toolbar and a tabbed MDI view. We now have dockable windows wrapped around our MDI client window. Add CDockMDI to Dockables.h and CViewMDI to views.h as follow:Ĭlass CViewMDI : public CMDIFrame::CMDIClientĭone. ![]() add #include ".Win32 \mdi.h" to Views.h (before dockable.h) Change m_DockView from CDockSimple to CDockMDIģ) Add a CDockMDI class and CViewMDI class as follows: use #include ".\Win32 \mdi.h" instead of #include "Win32 \frame.h" ![]() You can than modify the existing Docking sample to support MDI with the following changes:ġ) Edit Win32 's mdi.h (as described above)Ģ) Start with a copy of the Docking sample and modify MainFrm.h as follows: We need to modify the declaration of CMDIFrame to make CMDIClient public. Inside the declaration of CMDIFrame is a nested CMDIClient class. The easiest way to achieve this is to modify Win32 's 'mdi.h'. In your case we need to make this dock ancestor a MDI client view. It is the view window for CMainFrame, and is referred to as the DockAncestor in the CDockable class. This is the view window which remains when all possible windows are undocked. If you run the docking sample you will note the Simple docking view in the centre of the docking layout. Docking for MDI applications is a future direction for Win32 , but we can impliment docking with MDI applications with a bit of a hack.įirstly an overview of the docking philosophy in Win32 . ![]()
0 Comments
Leave a Reply. |