CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Guest

    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);
    }



  2. #2
    Join Date
    May 1999
    Posts
    48

    Re: Playing with CSplitterWnd - What's wrong?

    Maybe the problem is your CTimeView.
    Sincerely, Mihai



  3. #3
    Guest

    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.


  4. #4
    Join Date
    Apr 1999
    Location
    Quebec, Canada
    Posts
    39

    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.



  5. #5
    Guest

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured