Colored Scroll bars. - Programmer

This is a discussion on Colored Scroll bars. - Programmer ; 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, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Colored Scroll bars.

  1. 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.



  2. Re: Colored Scroll bars.

    "Alexander Arlievsky" wrote in message
    news:bo57td$k63$1@news2.netvision.net.il...
    > 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.


    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)
    http://www.themobius.co.uk/



  3. Re: Colored Scroll bars.

    You could try modifying my "custom scrollbar" library

    at www.codeproject.com/dialog/coolscroll.asp

    James
    --
    www.catch22.org.uk
    Free Win32 Software, Source Code and Tutorials



    "Tim Robinson" wrote in message
    news:bo5gag$189m7r$1@ID-103400.news.uni-berlin.de...
    > "Alexander Arlievsky" wrote in

    message
    > news:bo57td$k63$1@news2.netvision.net.il...
    > > 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.

    >
    > 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)
    > http://www.themobius.co.uk/
    >
    >




+ Reply to Thread