Click to See Complete Forum and Search --> : Playing with CSplitterWnd - What's wrong?


April 17th, 1999, 09:28 AM
No error in compiling. When I run, I get A SDI frame with ONE view filling out all of the view area of the frame. (?) Shouldn't I get 2 views (1 row w/2 col)? I was following Jeff Prosise's example. Would sure appreciate any suggestions. Here's the OnCreateClient function:

BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
m_wndSplitter.CreateStatic(this,1,2);
m_wndSplitter.CreateView(0,0,RUNTIME_CLASS (CTimeView),CSize(128,0),pContext);
m_wndSplitter.CreateView(0,1,RUNTIME_CLASS (CEditView),CSize(0,0),pContext);

return CFrameWnd::OnCreateClient(lpcs, pContext);
}

mihai
April 17th, 1999, 10:28 AM
Maybe the problem is your CTimeView.
Sincerely, Mihai

April 17th, 1999, 10:41 AM
Mahia, shouldn't I get a split window if program compiles? The app wizard created the CTimeView (derived from CView). I want to later place property pages in this view area. I still don't understand why I get 1 view area with no splitter . . . Appreciate your input.

Nath
April 17th, 1999, 12:15 PM
Hi,

Try to make some Views with no (0,0) size !!!
I think it will work better. In my mind you have 2 views but one has 0 width and 0 height.

Nath.

April 17th, 1999, 04:35 PM
Hi,

Chack the retuen value from CraeteView(...).
Remove the call to the base CFrameWnd::OnCreateClient(lpcs, pContext)
and just return true.

Abdu.

Good Luck