CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    51

    Setting Active View

    I have a SDI interface with a 2 pane vertical splitter. The pane on the left is created first and then the pane on the right. Each pane has a CView derrived class. A call to GetActiveView() will return a pointer to the CView of the right pane (the last one created). How can I get a pointer to the left view in pane 0 to pass to SetActiveView(CView *) to make it the active view?

    Thanks,

    Steven M. McNeese
    [email protected]

  2. #2
    Join Date
    Apr 1999
    Posts
    11

    Re: Setting Active View

    I think you must have a CSplitterWnd object, why don't you use SetActivePane(0, 0)? it will worked as SetActiveView, and could active left pane(view).


  3. #3
    Join Date
    Apr 1999
    Posts
    51

    Re: Setting Active View

    I was just trying that but I cannot figure out how to get access to my CSplitterWnd member variable. This variable is a member of CMainFrm and I am trying to access it the the main application class. Any ideas?

    Steven M. McNeese
    [email protected]

  4. #4
    Join Date
    Apr 1999
    Posts
    11

    Re: Setting Active View

    I think you can use this any where in your application.
    ((CMainFrm *)(::AfxGetMainWnd()))->m_splitterWnd.SetActivePane(0, 0)


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