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