0

I'm using a CEdit Control with the WTL framework and I've been searching around and I'm having trouble finding how to change the color of the scrollbar. Is there an easy way to do this or do you need to subclass the control?

LucasN
  • 243
  • 1
  • 2
  • 14
  • When using WTL, your `CEdit` already subclasses a native EDIT control. Not sure what else you wish to subclass. Besides, [there are two types of scrollbars](https://blogs.msdn.microsoft.com/oldnewthing/20040510-00/?p=39413). You haven't mentioned, which one you are using. – IInspectable Jun 07 '17 at 14:39
  • 2
    Even once you subclass the control, there is no "easy" way to change the color of a scrollbar. That is a project that would take an expert Win32 developer *several days* to implement; longer if he wanted it bug-free. I tried once a few years ago, in attempting to answer a SO question, and gave up because there are better things to do with your time. I strongly recommend abandoning this. What's wrong with the system theme? Why does your app need to stick out like a sore thumb? – Cody Gray - on strike Jun 07 '17 at 14:40
  • Sorry, I am using the automatic vertical scroll bar that is invoked by setting the proporties `Auto VScroll` to True and `Vertical Scroll` to True in the resource editor. – LucasN Jun 07 '17 at 14:50
  • 1
    Yeah, so you are using the automatic scrollbars. The ones everyone uses because they're easy and built-in. That means it'll be even harder, if not downright *impossible* to change their color. They aren't real controls; they're not even windows; there's no way to subclass them. The only way to do it would be to turn those off and either draw your own scrollbars or use the standalone scrollbar control that you had subclassed and customized. Which I already said is prohibitively difficult. – Cody Gray - on strike Jun 07 '17 at 14:53
  • You can check this out: https://www.catch22.net/tuts/custom-scrollbars – VuVirt Aug 29 '17 at 12:31

0 Answers0