Board index » cppbuilder » width of a scrollbar

width of a scrollbar


2008-02-23 08:27:39 AM
cppbuilder110
Hi,
In my application I need to change the width of a scrollbar. Wonder if
anyone know a way to do it?
I found code somewhere to change color of a Progressbar like this:
SendMessage(ProgressBar1->Handle, PBM_SETBARCOLOR, 0, color);
Thought there may be something similar for scrollbars?
I searched for PBM_SETBARCOLOR, but can't find where it is defined...
thanks
totte
 
 

Re:width of a scrollbar

"Totte Karlsson" < XXXX@XXXXX.COM >wrote in message
Quote
In my application I need to change the width of a scrollbar.
Scrollbars that are embedded inside of other controls do not allow their
sizes to be changed. You have to use a TScrollBar component for that. You
can then set its Width and Height properties as needed.
Quote
I found code somewhere to change color of a Progressbar like this:

SendMessage(ProgressBar1->Handle, PBM_SETBARCOLOR, 0, color);

Thought there may be something similar for scrollbars?
To change the color of a TScrollBar, you will have to subclass its
Windowproc property in order to intercept the CN_CTLCOLORSCROLLBAR message
directly. You can then draw your own background onto the provided HDC.
Quote
I searched for PBM_SETBARCOLOR, but can't find where it is defined...
commctrl.h
Gambit