Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > Visual C++
|
Visual C++ Questions specific to Microsoft's Visual C++. For questions not specific to this Microsoft version, use the C++ Programming forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual C++ section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 26th, 2004, 08:41 AM
Registered User
 
Join Date: Apr 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Switch between views in a SDI with Splitter?

I have a SDI with splitters that look like this:

______________
| | |
|View| |
|Tree| ViewList | (fig. 1)
| | |
| | |
|____|_________|

and I am trying to make a second View (Frame) with splitters that look like this:

________________
| | View 2 |
| |____________|
| | | |
|V1 | | |
| |V3 | View 4 | (fig. 2)
| | | |
| | | |
|___|___|________|

The 1. question: How can I switch between the frames (Views)?
The 2. question: How can I create the 2. frame with splitter to look as shown (fig. 2).

It is important for the first version, that I can switch between to frames. Maybe it is easier to make the second frame like this (no Splitter in a splitter –fig. 3):
_______________
|V 1 | view2 |
|____|__________|
|View| | (fig. 3)
| 3 |View 4 |
| | |
| | |
|____|_________|



Code:
//////////////////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, 
                                CCreateContext* pContext) 
{
    // Wenn Matrix aktiviert ist, dann ueberpruefe diesen Bereich auf Kommunalitat
    // may want to read Q99562 and Q141334
    if (!m_wndSplitter.CreateStatic(this,1,2))
    {
        return FALSE;
    }
        //m_wndSplitterDyn.Create(&m_wndSplitter, 2, 1, CSize ( 1, 1 ), pContext ) ;
            CRect rect;
            GetClientRect(&rect);
            CSize sizeTree = rect.Size();

            sizeTree.cx = rect.Width()/4; 

    if (!m_wndSplitter.CreateView(PANE_ROW_ZERO, eTreeWinPane, RUNTIME_CLASS(CViewTree),
                                        sizeTree, pContext)||  
        (!m_wndSplitter.CreateView(PANE_ROW_ZERO, eListWinPane, RUNTIME_CLASS(CViewList),
                                        /*CSize(0,0)*/CSize(100,100), pContext)))
        {    
            return FALSE;
        }
    return TRUE;
    //return CFrameWnd::OnCreateClient(lpcs, pContext);
}
///////////////////////////////////////////////////////////////////////////////////////////
Must I use OnCreateClient()function, or there is an alternative?






Similar Threads
Thread Thread Starter Forum Replies Last Post
how tol make an SDI design ergoktas C# 0 September 18th, 2006 02:02 AM
Switch rajuru Beginning PHP 2 February 9th, 2005 11:24 AM
converting Access 2000 views to Sql views matta Classic ASP Professional 1 January 26th, 2005 03:37 PM
retaining the aspect ratio of an SDI Window kenakena Visual C++ 0 November 19th, 2003 11:05 AM
Splitter window problems rbevers Visual C++ 4 October 4th, 2003 05:05 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.