Solved

Subclassing scrollbars in list and tree controls

Posted on 2002-05-09
5
430 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
ID: 6999807
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
ID: 6999814
Thanks Tony,

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

Expert Comment

by:antoinebf
ID: 6999820
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
ID: 6999830
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
ID: 6999869
sorry for duplicate comments... it got out of control I don't know how!!! :(

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

776 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