[GD-Windows] Custom colors on a scrollbar in a tree control?
Brought to you by:
vexxed72
From: Space N. E. <SPA...@ho...> - 2002-10-02 19:03:46
|
Hi, I have a Win32 app (no MFC) with a lot of subclassed common controls - subclassed so I can draw them the way I like. One big problem I've run into is that I can't seem to control the colors that scrollbars are drawn with when a window has WS_VSCROLL/WS_HSCROLL styles specified - this happens, for example, when a the data in a tree control is too large to fit in the client area. I know that the SysColors are used to control the drawing of window scrollbars, but I don't want to change the color of all scrollbars (and 3d controls in general), just those of my app. And more specifically, I'm a plugin, not an app, so I REALLY don't want to change the colors of the host app. I also tried double buffering - tweaking the WM_PAINT/WM_NCPAINT messages I receive, and sending in an offscreen HDC when I call the tree control's default window proc. Then I render over top of the scrollbars to effectively draw my own. This works very well, except that the scrollbars somehow redraw themselves without the aid of WM_PAINT/WM_NCPAINT when they are being dragged around, yielding a horrific flickering. How do web pages change IE's scrollbar colors? I'm guessing that the web browser control either has custom scrollbars, or uses a scrollbar control, etc. Bummer. Well, if anyone knows of a good way to do "owner draw" scrollbars on a window (not scrollbar controls), let me know! Thanks, Brian |