Hello

I am really new to MFC and to learn MFC im making an newsreader client
(NNTP). I have begun with the GUI. In the gui i want a splitted window
with a left side and a right side. On the right side i want a top part
and low part (like outlook express). I have the following code:

BOOL MainWindow::OnCreateClient(LPCREATESTRUCT lpcs,CCreateContext*
pContext){
child = new SplitWnd(this);
sub = new RightSplitWnd(child);

child->CreateStatic(this,1,2);
sub->CreateStatic(child,2,1);

child->CreateView(0,0,RUNTIME_CLASS(CTreeView),CSize(200, 200),pContext);
child->CreateView(0,1,RUNTIME_CLASS(RightSplitWnd),CSize( 200,200),pContext);

MessageBox("Tror");
sub->CreateView(0,0,RUNTIME_CLASS(CEditView),CSize(100, 200),pContext);
sub->CreateView(1,0,RUNTIME_CLASS(TreePane),CSize(100,2 00),pContext);

return true;
}

This doesnt work. When i run the program i get an exception in the
CSplitterWnd code. What is wrong?

And one more question: How does the program get hold of the views? Do
i have to override the GetPane(int,int) in CSplitterWnd?