?
Solved

Subclassing scrollbars in list and tree controls

Posted on 2002-05-09
5
Medium Priority
?
441 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
[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
  • 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 600 total points
ID: 6999869
sorry for duplicate comments... it got out of control I don't know how!!! :(

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

770 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