Hi, what i have is a window split horizontally, and the dockpane is tranparent and on the down. what can i do?
ima240109
Posts
-
How to put a dialog into CDockablePane? -
How to put a dialog into CDockablePane?hi, i've followed your step to pu dialog in dockpane but i can't see the dialog, i don't know how to fix this problem Here are the steps that I took. 1. I've created a new MFC MDI project (DialogDockableTester), with Visual Studio style, maximized, and with ribbons. 2. I've created a dialog, IDD_TEMPDLG. Border = None, Style = Child. 3. Added class CTempDlg : public CDialog to use IDD_TEMPDLG 4. Added class CMyDockablePane : public CDockablePane 5. Overridden CMyDockablePane::OnCreate(LPCREATESTRUCT lpCreateStruct) with this int CMyDockablePane::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CDockablePane::OnCreate(lpCreateStruct) == -1) return -1; BOOL bRet = m_TempoDlg.Create(IDD_TEMPDLG, this); ASSERT( bRet ); m_TempoDlg.ShowWindow(SW_SHOW); return 0; } 6. Added an object of CMyDockablePane, m_MyDockablePane in CMainFrame 7. Added this line in CMainFrame::OnCreate int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct) { // .... CString s2("Page"); if (!myPage.Create(s2, this, CRect(0, 0, 200, 200), TRUE, ID_OPERATION_PAGE, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | CBRS_LEFT| CBRS_FLOAT_MULTI)) { TRACE0("Failed to create objectPage\n"); return FALSE; // failed to create } myPage.EnableDocking(CBRS_ALIGN_ANY); DockPane(&myPage); CDockingManager::SetDockingMode(DT_SMART); EnableAutoHidePanes(CBRS_ALIGN_ANY); //... } in your steps you added an object of CTempDlg, m_TempDlg in CDialogDockableTesterView, and i don'nt know how to use m_TempDlg in CDialogDockableTesterView.cpp Am I missin something?