-
Colored Scroll bars.
Hi,
We would like to change background color of all scroll bar components in our
..Net application, but change should apply to all controls in our
application. I mean not only ScrollBar controls explicitly used, but scroll
bars in tree, listview, combo and third-party controls etc. We even have MFC
control used through managed c++ wrapper with its own scroll bars.
Is there some way to do it (subclassing windows, application-wide hook, etc)
?
We can code it Win32 pure if it helps.
Alexander Arlievsky.
-
Re: Colored Scroll bars.
"Alexander Arlievsky" <alex_ReMoVe_@mprest.remove.com.spam> wrote in message
news:bo57td$k63$1@news2.netvision.net.il...[color=blue]
> Hi,
> We would like to change background color of all scroll bar components in[/color]
our[color=blue]
> .Net application, but change should apply to all controls in our
> application. I mean not only ScrollBar controls explicitly used, but[/color]
scroll[color=blue]
> bars in tree, listview, combo and third-party controls etc. We even have[/color]
MFC[color=blue]
> control used through managed c++ wrapper with its own scroll bars.
> Is there some way to do it (subclassing windows, application-wide hook,[/color]
etc)[color=blue]
> ?
> We can code it Win32 pure if it helps.[/color]
This would be difficult. There is the WM_CTLCOLORSCROLLBAR message, but that
only works for separate scroll bar controls, not scroll bars attached to
windows. As MSDN says:
"The WM_CTLCOLORSCROLLBAR message is used only by child scrollbar controls.
Scrollbars attached to a window (WS_SCROLL and WS_VSCROLL) do not generate
this message. To customize the appearance of scrollbars attached to a
window, use the flat scroll bar functions."
You could experiment with applying flat scroll bars to every window your
application creates.
Hooking the scroll bars themselves may be out of the question, as they are
implemented partially in kernel mode. The authors of WindowBlinds (the
Windows UI themeing package) say that hooking scroll bars was the hardest
part of writing their software. I believe they're keeping how they did it
secret, and the free version of their software doesn't have that ability
built in.
--
Tim Robinson (MVP, Windows SDK)
[url]http://www.themobius.co.uk/[/url]
-
Re: Colored Scroll bars.
You could try modifying my "custom scrollbar" library
at [url]www.codeproject.com/dialog/coolscroll.asp[/url]
James
--
[url]www.catch22.org.uk[/url]
Free Win32 Software, Source Code and Tutorials
"Tim Robinson" <tim.at.gaat.freeserve.co.uk@invalid.com> wrote in message
news:bo5gag$189m7r$1@ID-103400.news.uni-berlin.de...[color=blue]
> "Alexander Arlievsky" <alex_ReMoVe_@mprest.remove.com.spam> wrote in[/color]
message[color=blue]
> news:bo57td$k63$1@news2.netvision.net.il...[color=green]
> > Hi,
> > We would like to change background color of all scroll bar components in[/color]
> our[color=green]
> > .Net application, but change should apply to all controls in our
> > application. I mean not only ScrollBar controls explicitly used, but[/color]
> scroll[color=green]
> > bars in tree, listview, combo and third-party controls etc. We even have[/color]
> MFC[color=green]
> > control used through managed c++ wrapper with its own scroll bars.
> > Is there some way to do it (subclassing windows, application-wide hook,[/color]
> etc)[color=green]
> > ?
> > We can code it Win32 pure if it helps.[/color]
>
> This would be difficult. There is the WM_CTLCOLORSCROLLBAR message, but[/color]
that[color=blue]
> only works for separate scroll bar controls, not scroll bars attached to
> windows. As MSDN says:
>
> "The WM_CTLCOLORSCROLLBAR message is used only by child scrollbar[/color]
controls.[color=blue]
> Scrollbars attached to a window (WS_SCROLL and WS_VSCROLL) do not generate
> this message. To customize the appearance of scrollbars attached to a
> window, use the flat scroll bar functions."
>
> You could experiment with applying flat scroll bars to every window your
> application creates.
>
> Hooking the scroll bars themselves may be out of the question, as they are
> implemented partially in kernel mode. The authors of WindowBlinds (the
> Windows UI themeing package) say that hooking scroll bars was the hardest
> part of writing their software. I believe they're keeping how they did it
> secret, and the free version of their software doesn't have that ability
> built in.
>
> --
> Tim Robinson (MVP, Windows SDK)
> [url]http://www.themobius.co.uk/[/url]
>
>[/color]