Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Drawing two splitters Correctly

Posted on 1998-07-14
4
Medium Priority
?
178 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
  • 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 400 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

810 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