[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Titles for splitter windows

Posted on 1997-04-01
7
Medium Priority
?
375 Views
Last Modified: 2013-11-20
I have a CSplitterWnd with a CTreeView on the left and a CScrollView on the right.   I'd like to place titles above the CTreeView and CScrollView. (Similar to the "All Folders" and "Contents of..." titles displayed by Windows Explorer.)  How do I do this?
0
Comment
Question by:JohnWeidner
[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
  • 3
  • 3
7 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 200 total points
ID: 1300790
The "All Folders" and "Contents of..." titles displayed by Windows Explorer are static windows. You can use CStatic class to create them and use CWnd::SetWindowText() (CStatic is derived from CWnd) to set the text.

0
 

Author Comment

by:JohnWeidner
ID: 1300791
Yes, but how do I make the title's CStatic windows appear as being within the splitter area and above the TreeView and ScrollView.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1300792
You can use CSplitterWnd::CreateStatic() to create a static splitter window with four panes: two CStatic, CTreeView and CScrollView. Please see Programming with MFC - Technical Note 29 for how to create nonview panes.

Or, you can create two views CLeftView (CStatic and CTreeView are its child windows) and CRightView (CStatic and CScrollView are its child windows). Then, create a static splitter window with two panes: CLeftView and CRightView.

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:JohnWeidner
ID: 1300793
If I used the first suggestion (one splitter with four panes) wouldn't the user be able to resize the split between the titles and the views below them?  The second suggestion sounds more like what I think I need to do.  Considering, that the program already has the splitter with the tree and scroll views set up, I was wishing there would be an easier way to simply add titles.
0
 
LVL 23

Expert Comment

by:chensu
ID: 1300794
Yes, the first method is not good. I am also wondering whether we can put two windows (e.g., CStatic and CTreeView) into one pane by calling CSplitterWnd::CreateView() twice with the same pane. And set their initial position and size within OnCreate() of the two windows. If this way is OK, please let me know. Thank you.


0
 

Author Comment

by:JohnWeidner
ID: 1300795
Sorry, it took so long for me to grade.  I got side tracked on other projects.  I have yet to try to implement your suggestions but I didn't want to string you out waiting for a grade any longer.
0
 

Expert Comment

by:kbb
ID: 1300796
What about having the title be a status bar control, docked to the top of each of the splitter's two frame views? Haven't tried it yet, but that's what I figured Microsoft had done in their explorer.
0

Featured Post

What’s Wrong with Your Cloud Strategy ?

Even as many CIOs are embracing a cloud-first strategy, the reality is that moving to the cloud is a lengthy process and the end-state is likely to be a blend of multiple clouds—public and private. Learn why multicloud solutions matter in this webinar by Nimble Storage.

Question has a verified solution.

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

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

650 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