我想让CMDIChildWnd成为Dockable ....我的代码创建窗口框架单击功能区按钮时我想要以选项卡式格式停靠所有窗口,当我放置拖动我的框架时显示停靠管理器格式[DT_SMART]。 ..
此代码是Button Click事件创建多个Frame ....
pDocTemplate_New1 = new CMultiDocTemplate ( IDR_RiboonCFormViewTYPE,
RUNTIME_CLASS(CRiboonCFormViewTestDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CDepartement));
AfxGetApp () -> AddDocTemplate (pDocTemplate_New1);
// Create a new child window
CMDIChildWnd * pMDIActive = MDIGetActive (); // get the pointer of the currently active child window
//CDocument * pDoc = (CDocument *) pMDIActive-> GetActiveDocument (); // get the document pointer
CMDIChildWnd * pNewFrame = (CMDIChildWnd *) (pDocTemplate_New1 -> CreateNewFrame (NULL, NULL));
pNewFrame->EnableDocking(CBRS_ALIGN_ANY);
EnableDocking(CBRS_ALIGN_ANY);
// Create a new frame window
if (pNewFrame == NULL)
{
AfxMessageBox("new window can not be established ", MB_OK, 0);
}
pDocTemplate_New1 -> InitialUpdateFrame (pNewFrame, NULL); // display window
MDITile (MDITILE_HORIZONTAL); // tile multiple windows
答案 0 :(得分:0)
CMDIFrameWndEx
派生。CMainFrame
CBRS_FLOAT_MULTI
使可停靠窗格在附加到选项卡时作为一个单元浮动。
像CBRS_LEFT
这样的对齐样式为窗格提供了初始对齐。AttachToTabWnd
()添加您的窗格