Solved

Subclassing scrollbars in list and tree controls

Posted on 2002-05-09
5
423 Views
Last Modified: 2010-05-18
How can I subclass the scrollbar inside a CListCtrl or a CTreeCtrl.  The method GetScrollBarCtrl returns NULL. My lists and tree are very nice but I'm stuck with ugly gray scrollbars. I only I could get a hold on it...
0
Comment
Question by:mahtieubrault
  • 4
5 Comments
 
LVL 2

Expert Comment

by:antoinebf
Comment Utility
From my limited experience (it's also been a while...), you have to implement your own... and draw them on top of those grey ones... It's a nice hack, but then again, what isn't in windows...

"That custom scroll bar would then relay the scroll messages directly to treectrl. We also had to implement all the displays of the scrollbar (thumb, buttons, etc.)"
  - cyberbum

I'll try to find my old stuff and mail some useful info from it to you...

A.
0
 

Author Comment

by:mahtieubrault
Comment Utility
Thanks Tony,

Do I have to paint after the WN_NCPAINT ?
0
 
LVL 2

Expert Comment

by:antoinebf
Comment Utility
From my limited experience (it's also been a while...), you have to implement your own... and draw them on top of those grey ones... It's a nice hack, but then again, what isn't in windows...

"That custom scroll bar would then relay the scroll messages directly to treectrl. We also had to implement all the displays of the scrollbar (thumb, buttons, etc.)"
  - cyberbum

I'll try to find my old stuff and mail some useful info from it to you...

A.
0
 
LVL 2

Expert Comment

by:antoinebf
Comment Utility
From my limited experience (it's also been a while...), you have to implement your own... and draw them on top of those grey ones... It's a nice hack, but then again, what isn't in windows...

"That custom scroll bar would then relay the scroll messages directly to treectrl. We also had to implement all the displays of the scrollbar (thumb, buttons, etc.)"
  - cyberbum

I'll try to find my old stuff and mail some useful info from it to you...

A.
0
 
LVL 2

Accepted Solution

by:
antoinebf earned 200 total points
Comment Utility
sorry for duplicate comments... it got out of control I don't know how!!! :(

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

728 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

12 Experts available now in Live!

Get 1:1 Help Now