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. CSplitterWnd without AppWizard

CSplitterWnd without AppWizard

Scheduled Pinned Locked Moved C / C++ / MFC
c++questionhelp
4 Posts 3 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.
  • N Offline
    N Offline
    Nathan Hoffman
    wrote on last edited by
    #1

    Hello everybody. I'm trying to create a fairly simple test application using MFC _without_ the AppWizard (I hate wizards). I'm trying to implement a static vertically split window with a different view in each pane. I have had no luck so far; I keep getting an assertion error within winocc.cpp when I try to run it (I've tried debugging, but don't understand a lot of the code in winocc.cpp). Now my question is this: Could someone show me a simple app implementing a vertical splitter window with two different views (without using the AppWizard)? I don't need anything fancy, just a bare bones SDI app.

    C V N 3 Replies Last reply
    0
    • N Nathan Hoffman

      Hello everybody. I'm trying to create a fairly simple test application using MFC _without_ the AppWizard (I hate wizards). I'm trying to implement a static vertically split window with a different view in each pane. I have had no luck so far; I keep getting an assertion error within winocc.cpp when I try to run it (I've tried debugging, but don't understand a lot of the code in winocc.cpp). Now my question is this: Could someone show me a simple app implementing a vertical splitter window with two different views (without using the AppWizard)? I don't need anything fancy, just a bare bones SDI app.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Why don't you create one with the wizard and then look through it. The *point* of the wizard is to save you the set up time that you seem to want to spend yourself, so it seems natural that you let it show you how it is done, then you can do it yourself. To counter any hint of rudeness in the above, I admit to not using the ClassWizard terribly often because I like putting everything in myself..... Christian #include "std_disclaimer.h" People who love sausage and respect the law should never watch either one being made. The things that come to those who wait are usually the things left by those who got there first.

      1 Reply Last reply
      0
      • N Nathan Hoffman

        Hello everybody. I'm trying to create a fairly simple test application using MFC _without_ the AppWizard (I hate wizards). I'm trying to implement a static vertically split window with a different view in each pane. I have had no luck so far; I keep getting an assertion error within winocc.cpp when I try to run it (I've tried debugging, but don't understand a lot of the code in winocc.cpp). Now my question is this: Could someone show me a simple app implementing a vertical splitter window with two different views (without using the AppWizard)? I don't need anything fancy, just a bare bones SDI app.

        V Offline
        V Offline
        Vivek Rajan
        wrote on last edited by
        #3

        Hi- -Pls post the code- if you want specific help - Ok, you dont like the AppWizard, but I am sure you have the following.. 1. A CFrameWnd derived class 2. A CView derived class ( for the left pane) 3. A CView derived class ( for the right pane) I assume you also dont like ClassWizard, in that case 1. Manually override the OnCreateClient function in the CFrameWnd derived class. 2. Add a member variable CSplitterWnd (m_wndSplitter) in the CFrameWnd dervied class. 3. Add the following code to the OnCreateClient function.. ..... m_wndSplitter.CreateStatic(this, 2,1); m_wndSplitter.CreateView(0,0,RUNTIME_CLASS(LeftView),CSize(rect.Width(),rect.Height()), pContext); m_wndSplitter.CreateView(1,0,RUNTIME_CLASS(RightView),CSize(rect.Width(),rect.Height()/4), pContext); ..... Voila thats it.. Also handle the WM_SIZE mthod if you want to.. One suggestion : If you refuse to use AppWizard or ClassWizard, you are setting yourself up for a lot of misery. Later- V

        1 Reply Last reply
        0
        • N Nathan Hoffman

          Hello everybody. I'm trying to create a fairly simple test application using MFC _without_ the AppWizard (I hate wizards). I'm trying to implement a static vertically split window with a different view in each pane. I have had no luck so far; I keep getting an assertion error within winocc.cpp when I try to run it (I've tried debugging, but don't understand a lot of the code in winocc.cpp). Now my question is this: Could someone show me a simple app implementing a vertical splitter window with two different views (without using the AppWizard)? I don't need anything fancy, just a bare bones SDI app.

          N Offline
          N Offline
          Nathan Hoffman
          wrote on last edited by
          #4

          Thanks everyone. After a long and hard battle trying to do it myself without the wizard I have to admit to defeat. I cannot get it working without having debug assertions flying left and right. So I have seen the err in my ways and have switched to the dark side. After only about twenty minutes of getting familiar with the wizards I finally have my splitter window working. :)

          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