Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Splitter Window for MDI.

Splitter Window for MDI.

Scheduled Pinned Locked Moved C / C++ / MFC
help
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    janaswamy uday
    wrote on last edited by
    #1

    Hi All, I am trying to get a splitter window for MDI when a Menu Item in Menu is clicked. The splitter window is been created but when i am trying to drag that Splitter it is not able to split also it is not performing the events of the pane. (i.e) if in Pane2 of the splitter i am having a Button Control it is not been handled. Help me out! Thanks, Uday. Here is the Code. ----------------- void CMainFrame::OnMytreeTree() { CCreateContext ctx; ctx.m_pNewViewClass = RUNTIME_CLASS(CudayView); // GetActiveDocument() call before you destroy m_splitter. ctx.m_pCurrentDoc = GetActiveDocument(); //ASSERT(ctx.m_pCurrentDoc!=NULL); // m_pSplitter !=NULL when there is a visible splitter. if (m_pSplitter) { // Destroy splitter window. delete m_pSplitter; m_pSplitter = NULL; // Create and initialize CMyView. SetActiveView((CView*)CreateView(&ctx)); GetActiveView()->OnInitialUpdate(); } else { if(m_pSplitter == NULL) { //MDIGetActive()->DestroyWindow(); // Create new splitter window. m_pSplitter = new CSplitterWnd; if (!m_pSplitter->CreateStatic(this, 1, 2)) { TRACE0("Can't create splitter window.\n"); return; } else { if ((!m_pSplitter->CreateView(0, 0, RUNTIME_CLASS(CMyTreeView), CSize(200, 0), &ctx)) ||(!m_pSplitter->CreateView(0, 1, RUNTIME_CLASS(CFirstView), CSize(500, 0), &ctx))) { TRACE0("Can't create one of the splitter panes.\n"); return; } // Initialize the two panes (each containing a view // associated with the current document). ((CView*)m_pSplitter->GetPane(0, 0))->OnInitialUpdate(); ((CView*)m_pSplitter->GetPane(0, 1))->OnInitialUpdate(); SetActiveView((CView*)m_pSplitter->GetPane(0, 0)); } } } // Redisplay frame. RecalcLayout(); }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups