April 8th, 2010

Why doesn't SS_WHITERECT actually draw a white rectangle?

There are six styles available to the static controls which draw frames and rectangles in one of three fixed colors:

SS_BLACKRECT SS_BLACKFRAME
SS_GRAYRECT SS_GRAYFRAME
SS_WHITERECT SS_WHITEFRAME

But if you actually create a static control with one of these styles, you’ll find that the color isn’t actually black, gray, or white. So why are they called black, gray, and white? Because they used to be black, gray, and white.

Knowledge Base article 125684 gives the history behind these styles. Back in the 16-bit days, these styles really did give you black, gray, and white, or at least they did if you used the default color scheme. Windows 95 shifted from using the window colors to the 3D colors, presumably to give the system a less harsh look.

Topics
History

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.

Feedback