Solved

View control width

Posted on 1997-07-13
1
234 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 50 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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
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 learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

734 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