Thread: color edit control's scroll bar

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    24

    color edit control's scroll bar

    I have a multiline richedit control with it's background set to black when the scrollbar appears it's blue(xp) and it kind of looks odd. Is there anyway to change this color?
    i know of the WM_CTLCOLORSCROLLBAR message but child scrollbars don't recieve this message.
    thanks

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    The remarks at the bottom of msdn's WM_CTLCOLORSCROLLBAR message suggest you use flat scroll bars. For colour changes, FlatSB_SetScrollProp looks a likely candidate.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    24
    i tried:
    Code:
    	if(InitializeFlatSB(richedit1) == 0)
    	{
    		MessageBox(0,"InitializeFlatSB() failed","",0);
    	}
    	if(FlatSB_SetScrollProp(richedit1,WSB_PROP_VBKGCOLOR,(INT_PTR)RGB(0,0,0),true) == 0)
    	{
    		MessageBox(0,"setting color failed","",0);
    	}
    FlatSB_SetScrollProp(richedit1,WSB_PROP_VBKGCOLOR, (INT_PTR)RGB(0,0,0),true) fails every time

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Have you #included <commctrl.h> and linked with comctl32.lib?
    Does FlatSB_SetScrollProp always return 0 (if not, have you called FlatSB_ShowScrollBar to display the scrollbar)?
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User
    Join Date
    Jul 2004
    Posts
    24
    i have included <commctrl.h> and linked with comctl32.lib.

    Code:
    InitializeFlatSB(richedit1);
    FlatSB_ShowScrollBar(richedit1,SB_VERT,true);
    FlatSB_SetScrollProp(richedit1,WSB_PROP_VBKGCOLOR,(INT_PTR)RGB(0,0,0),true);
    this shows the scrollbar when it's called, but doesn't change the color.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  2. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  3. no horizontal scroll bar?
    By scott27349 in forum C++ Programming
    Replies: 0
    Last Post: 03-16-2002, 10:41 PM
  4. Problem with Scroll Bar
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 11-05-2001, 05:34 AM
  5. Problem with Scroll Bar
    By Garfield in forum Windows Programming
    Replies: 3
    Last Post: 11-01-2001, 02:23 PM