Solved

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

Posted on 2001-07-16
6
265 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

815 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

13 Experts available now in Live!

Get 1:1 Help Now