Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2001-07-16
6
Medium Priority
?
274 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

971 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