Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

View control width

Posted on 1997-07-13
1
Medium Priority
?
237 Views
Last Modified: 2008-02-26
I am implementing an Explorer type interface using the MFC CSplitterWnd class as a static splitter.  The left pane is a CTreeView and the right pane is a CListView.  After adding a couple of nodes to the tree control, I want to resize the pane to show all the nodes.  I know I can set the splitter pane width using the SetColumnInfo function, but I can't figure out how to get the width of the tree control that the CTreeView wraps.
0
Comment
Question by:acostiga
[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
1 Comment
 
LVL 3

Accepted Solution

by:
jaba earned 150 total points
ID: 1164906
You can retrive CTreeCtrl object from CTreeView . When you need enumerate all visible items ot CTreeCtrl and call GetItemRect functin for each of this item. You need to find maximal right of items rectangles. it is value you need. If you want optimize  this for speed you can check for Visible controls only , enumerata only visible items etc. But its not necessary

            Sergey
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

722 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