Solved

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

Posted on 2001-07-16
6
262 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
PAQed, with points refunded (300)

CetusMOD
Community Support Moderator
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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