Solved

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

Posted on 2001-07-16
6
268 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
[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
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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