Solved

Drawing two splitters Correctly

Posted on 1998-07-14
4
174 Views
Last Modified: 2013-11-20
I'm going for a "Outlook" look.

I've got the mainframe (SDI) split verticly in to 2 views (left/right). The right view is split into 2 views (top/bottom). They form a 'T' lieing down. Where the splitters meet they do not touch, I mean there is a black border around each spliter so they do not meld nicely togetter. (Looks BAD!!)

Questions:
How do I get them to "meld" and become solid?
If I do my own painting how do I get the intersections coords where the spliters meet?

Thomas
0
Comment
Question by:SirThomas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 1

Expert Comment

by:Andy_Keys
ID: 1319167
Post the code you use to create the splitters as that might help.
0
 

Author Comment

by:SirThomas
ID: 1319168
// Main Frame Creates Views 1 and 2
// ============================================================================
BOOL CMainFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
{

      lpcs;
    pContext;

      // CG: The following block was added by the Split Bars component.
      {

    if (!m_wndSplitter.CreateStatic (this, 1, 2) ||
        !m_wndSplitter.CreateView (0, 0, RUNTIME_CLASS (CView1),CSize ( 100, 0), pContext) ||
        !m_wndSplitter.CreateView (0, 1, RUNTIME_CLASS (CView2),CSize (   0, 0), pContext))
            {
                  TRACE0("Failed to create split bar ");
                  return FALSE;    // failed to create
            }
            return TRUE;
      }
}

// View 2 creates a splitter which create 2 new views 3 and 4
// ============================================================================

int CView2::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
      if (CView::OnCreate(lpCreateStruct) == -1)
            return -1;

      // TODO: Add your specialized creation code here

      // The context information is passed on from the framework
      CCreateContext *pContext = (CCreateContext*)lpCreateStruct->lpCreateParams;

    if (!m_wndSplitter.CreateStatic (this, 2, 1) ||
        !m_wndSplitter.CreateView (0, 0, RUNTIME_CLASS (CView3),CSize ( 100, 0), pContext) ||
        !m_wndSplitter.CreateView (1, 0, RUNTIME_CLASS (CView4),CSize (   0, 0), pContext))
            {
                  TRACE0("Failed to create split bar ");
                  return FALSE;    // failed to create
            }


      return 0;
}

// ============================================================================
I would like to also say I've tried using frames inside each other. Instead of view 2 I create and Inside frame which creates the 2 views (3&4). This looks even worse. The 3D effect of the frames inside each other is way to much.

Hope this helps.
Thomas
0
 
LVL 1

Accepted Solution

by:
Andy_Keys earned 100 total points
ID: 1319169
If I'm correct then what you what is a final view that look like   |View2
      view1|-----
           |View3  
 if so the look at ViewEX MFC sample its show you how to split a pane into more subpanes. Fragment of code to do it follows
m_wndSplitter.CreateStatic(this, 1, 2)
m_wndSplitter2.CreateStatic(
            &m_wndSplitter,
            2, 1,
            WS_CHILD | WS_VISIBLE | WS_BORDER,
            m_wndSplitter.IdFromRowCol(0, 1))
You can then go on to create the views




0
 

Author Comment

by:SirThomas
ID: 1319170
Thank you very much :>

It work perfectly. I guess it's time to go through the examples that came with VC again.

Best Regards
Thomas
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question