Home > Software engineering > MFC dialog based engineering how to add a dockable floating window? CDockablePane
MFC dialog based engineering how to add a dockable floating window? CDockablePane
Time:10-30
RT, online said dock engineering are based on the document to add floating window, Based on the dialog box construction zha? Try the along while didn't succeed
CodePudding user response:
First add CFrameWndEx
CodePudding user response:
The reference example //mdi in dialog Void CMdiInDlgDlg: : OnButton1 () { //Only one MdiView allowed! If (m_pMyMdi) { If (IsWindow (m_pMyMdi - & gt; M_hWnd)) { M_pMdiView - & gt; DestroyWindow (); M_pMyMdi - & gt; DestroyWindow (); M_pMyMdi=0; M_pMdiView=0; } } M_pMyMdi=new CMyMdi; M_pMdiView=new CMdiView; //use the create! DWORD dwStyle=WS_CHILD | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;//; // CRect rc; GetClientRect (& amp; Rc); Rc. Bottom -=50;//keep 'OK' visible If (m_pMyMdi - & gt; Create (0, 0, dwStyle, rc, this)) {//subcalss the MDIClient Windows with CMdiView for drawing M_pMyMdi - & gt; ShowWindow (SW_SHOW); M_pMdiView - & gt; SubclassWindow (m_pMyMdi - & gt; M_hWndMDIClient); } }