Microsoft KB Archive/32920

MSJ COLORSCR: Color Scroll Using Child Window Controls

PSS ID Number: Q32920 Article last modified on 04-16-1991

MS-DOS | OS/2

Summary: The following is a summary of the program found in the “Microsoft Systems Journal” and in the Software/Data Library. Issue: May 1987, Vol. 2, No. 2, pages 67-75 Title: “A Simple Windows Application for Custom Color Mixing” Author: Charles Petzold Keyword: COLORSCR DOLORSCR can be found in the Software/Data Library by searching on the keyword COLORSCR, the Q number of this article, or S10002. COLORSCR was archived using the PKware file-compression utility. The COLORSCR program displays a window with three scroll bars in half of it and a big open space in the rest. The three scroll bars are used to adjust the levels of red, blue, and green in the rest of the window. In doing so, it demonstrates the use of scroll bars and child windows. The following text is taken from the cover of the “Microsoft Systems Journal”: Our regular programming article presents COLORSCR, a deceptively simple program. On the surface, it provides three scroll bars to adjust the red, green, and blue components of GDI color specification. The elegance of the design is its use of child windows to manage the screen area.

More Information: Some of the Windows programming concepts used in COLORSCR are the following: 1. Using child-window controls 2. Using scroll bars with mouse and keyboard input 3. Subclassing the scroll bars to allow tabbing between them 4. Changing the color of a window by changing the background color of its class