Solved

Owner drawn tree control horiz item extent question...?

Posted on 2001-07-16
6
264 Views
Last Modified: 2013-12-03
Hi all.  I am writing a custom tree control where I draw everything in the item's area.  Since I draw my own stuff, including boxes that extend past the end of my text, Windows doesn't know what the real X (horizontal) extent of my items are.

The result is that I do not get an horizontal scrolling bar where I should.  

How can I tell Windows the true extent of my items?  

Thanks for the help.
0
Comment
Question by:asselins
  • 2
6 Comments
 
LVL 5

Expert Comment

by:robpitt
ID: 6288950
Is this a new custom control that you have created which is similar to a tree view control?
-OR-
Are you using custom draw to customise the standard tree view control?
0
 
LVL 5

Expert Comment

by:robpitt
ID: 6289173
Two additional thoughts....

If using custom draw and handling CDDS_ITEMPREPAINT, have you tried just enlarging the rect in the customdraw structure?

And what about just calling SetScrollInfo() to change the page size, maybe that'll work.
0
 

Author Comment

by:asselins
ID: 6290685
It's a derivative of CTreeCtrl which handles NM_CUSTOMDRAW.

You can't enlarge the rect that is initialized as part of the CDDS_ITEMPREPAINT notification, because it is read only.  It always contains the rect that is of the full width of the tree control and of whatever height you dictated for your items, so you can take care of indentation and whatnot.

I didn't look into SetScrollInfo(), I'll give that a try.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 10662085
PAQed, with points refunded (300)

CetusMOD
Community Support Moderator
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

932 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now