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. SDI application with 3 views [SOLVED]

SDI application with 3 views [SOLVED]

Scheduled Pinned Locked Moved C / C++ / MFC
c++designdata-structureshelptutorial
9 Posts 5 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.
  • E Offline
    E Offline
    ekinnh
    wrote on last edited by
    #1

    Hi, I'm newbie here. I wanted to create a SDI MFC application with 3 views in one window. The layout is like this ======= + 1 + ------------- + 2 + 3 + ======= 1. List View 2. Tree View 3. Tab control with list view Can anyone help me on how to design this window at first place. Either using Splitter or Window Explorer option. Thank you

    E M V S 5 Replies Last reply
    0
    • E ekinnh

      Hi, I'm newbie here. I wanted to create a SDI MFC application with 3 views in one window. The layout is like this ======= + 1 + ------------- + 2 + 3 + ======= 1. List View 2. Tree View 3. Tab control with list view Can anyone help me on how to design this window at first place. Either using Splitter or Window Explorer option. Thank you

      E Offline
      E Offline
      Eugen Podsypalnikov
      wrote on last edited by
      #2

      It could be a splitter window (2 + 3) in another (1 + (2 + 3)) :)

      They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)

      1 Reply Last reply
      0
      • E ekinnh

        Hi, I'm newbie here. I wanted to create a SDI MFC application with 3 views in one window. The layout is like this ======= + 1 + ------------- + 2 + 3 + ======= 1. List View 2. Tree View 3. Tab control with list view Can anyone help me on how to design this window at first place. Either using Splitter or Window Explorer option. Thank you

        E Offline
        E Offline
        Eugen Podsypalnikov
        wrote on last edited by
        #3

        May be the solution is also thinkable for you :) : - An MDI app - The Tabed MDI list-views controlled by the selection in your tree control - The Tree control is in a pane (CDockablePane) controlled by the selection in your main list control - The Main list control is in a pane as well - The layout of the MDI-area and panes is controlled by the Users and remanent for them

        They sought it with thimbles, they sought it with care; They pursued it with forks and hope; They threatened its life with a railway-share; They charmed it with smiles and soap. :)

        1 Reply Last reply
        0
        • E ekinnh

          Hi, I'm newbie here. I wanted to create a SDI MFC application with 3 views in one window. The layout is like this ======= + 1 + ------------- + 2 + 3 + ======= 1. List View 2. Tree View 3. Tab control with list view Can anyone help me on how to design this window at first place. Either using Splitter or Window Explorer option. Thank you

          M Offline
          M Offline
          Mohibur Rashid
          wrote on last edited by
          #4

          create three different custom window-class and create those window on the main window when required

          1 Reply Last reply
          0
          • E ekinnh

            Hi, I'm newbie here. I wanted to create a SDI MFC application with 3 views in one window. The layout is like this ======= + 1 + ------------- + 2 + 3 + ======= 1. List View 2. Tree View 3. Tab control with list view Can anyone help me on how to design this window at first place. Either using Splitter or Window Explorer option. Thank you

            V Offline
            V Offline
            Vaclav_
            wrote on last edited by
            #5

            Unless you absolutely have to have ONLY 3 views why don't you use standard CSplitter CreateStatic and create CSplitter frame with 4 views? Than let the MFC do the dirty work. No need to customize anything.

            E 1 Reply Last reply
            0
            • E ekinnh

              Hi, I'm newbie here. I wanted to create a SDI MFC application with 3 views in one window. The layout is like this ======= + 1 + ------------- + 2 + 3 + ======= 1. List View 2. Tree View 3. Tab control with list view Can anyone help me on how to design this window at first place. Either using Splitter or Window Explorer option. Thank you

              S Offline
              S Offline
              Sunil P V
              wrote on last edited by
              #6

              Inherit your application view class from CFormView. This enables you to have controls on the view just like you would have on a dialog. For your usage I think this is suitable and it saves time. Check for online samples too...

              Sunil

              1 Reply Last reply
              0
              • V Vaclav_

                Unless you absolutely have to have ONLY 3 views why don't you use standard CSplitter CreateStatic and create CSplitter frame with 4 views? Than let the MFC do the dirty work. No need to customize anything.

                E Offline
                E Offline
                ekinnh
                wrote on last edited by
                #7

                Thanks. I managed to do the 3 views splitter windows. :)

                V 1 Reply Last reply
                0
                • E ekinnh

                  Thanks. I managed to do the 3 views splitter windows. :)

                  V Offline
                  V Offline
                  Vaclav_
                  wrote on last edited by
                  #8

                  Great, can you share the basic idea / code? I was thinking 1 column / 3 rows would also work if it is acceptable.

                  E 1 Reply Last reply
                  0
                  • V Vaclav_

                    Great, can you share the basic idea / code? I was thinking 1 column / 3 rows would also work if it is acceptable.

                    E Offline
                    E Offline
                    ekinnh
                    wrote on last edited by
                    #9

                    I just got the idea from this article: http://www.codeproject.com/Articles/190/A-Visual-Framework-Views-Tabs-and-Splitters Basically I just wrote this in the MainFrame:

                    m_wndSplitterHor.CreateStatic(this, 2, 1)
                    m_wndSplitterHor.CreateView(0, 0, RUNTIME_CLASS(CSampleCollectList), CSize(280,300), pContext) //View 1
                    m_wndSplitterHor.SetColumnInfo(0, 200, 0);

                    m_wndSplitterVer.CreateStatic(&m_wndSplitterHor, 1, 2, WS_CHILD | WS_VISIBLE, m_wndSplitterHor.IdFromRowCol(1, 0))
                    m_wndSplitterVer.CreateView(0, 0, RUNTIME_CLASS(CSampleTree), CSize(250,0), pContext) //View 2
                    m_wndSplitterVer.CreateView(0, 1, RUNTIME_CLASS(CSampleCollectList), CSize(250,0), pContext) //View 3

                    But now im stuck with tab control in View 3. Any idea?

                    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