Playing with CSplitterWnd - What's wrong?
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);
}
Re: Playing with CSplitterWnd - What's wrong?
Maybe the problem is your CTimeView.
Sincerely, Mihai
Re: Playing with CSplitterWnd - What's wrong?
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.
Re: Playing with CSplitterWnd - What's wrong?
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.
Re: Playing with CSplitterWnd - What's wrong?
Hi,
Chack the retuen value from CraeteView(...).
Remove the call to the base CFrameWnd::OnCreateClient(lpcs, pContext)
and just return true.
Abdu.
Good Luck