Solved

Drawing two splitters Correctly

Posted on 1998-07-14
4
173 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Include multiple hostnames in this command? 3 55
sum28 challenge 31 117
haveThree challenge 22 123
withoutTen challenge 14 137
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.

726 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