• Welcome to Valhalla Legends Archive.
 

Scroll bar

Started by Rince, November 22, 2004, 08:08 PM

Previous topic - Next topic

Rince

is there a way to change ur Vb projects scroll bar colour?

LivedKrad

I think you can use CallWindowProc to set VScrollBar/HScrollBar's color.

UserLoser.

Quote from: LivedKrad on November 22, 2004, 08:13 PM
I think you can use CallWindowProc to set VScrollBar/HScrollBar's color.

CallWindowProc is just what you use to return unhandled window messages by your subclasser to the original window proc, so, I don't think that can help.  I'd assume catching WM_CREATE, WM_DRAWITEM, or WM_PAINT and handling things in there could change the scroll bar's style

LivedKrad

#3
Well, like I said, I 'think' that could've worked. I just quickly searched for a solution via Google and grabbed the first thing I saw. I don't do much work with API because well, I don't program that often. Sorry for the misinformation, I obviously have a mediocre thought process. :P

I'm not saying I know what CallWindowProc does, but it seems like (from your post) that you could catch an unhandled message sent by the scrollbar's object and then actually handle it. (Since you used the words "catch" when describing the messages you could use to change properties.)

FrOzeN

#4
You can change scroll bar colours using theses API's but it takes alittle mucking around with them.. google the for more info..

QuoteFlatSB_EnableScrollBar 
FlatSB_GetScrollInfo 
FlatSB_GetScrollPos 
FlatSB_GetScrollProp 
FlatSB_GetScrollRange 
FlatSB_SetScrollInfo 
FlatSB_SetScrollPos 
FlatSB_SetScrollProp 
FlatSB_SetScrollRange 
FlatSB_ShowScrollBar

[EDIT] Well there also for creating ScrollBars dynamically but some still work for modifying scrollbar colours or you can create a new scrollbar over the existing which makes the other one unnoticeable.
~ FrOzeN