Click here to Skip to main content
15,892,809 members
Articles / Programming Languages / C++

Writing Win32 Apps with C++: V2 - part 1

Rate me:
Please Sign up or sign in to vote.
4.70/5 (34 votes)
20 Jun 2005CPOL14 min read 107.9K   1.2K   73  
An independent framework to handle Win32 objects inside C++ classes.
////////////////////////////////////////////////
//	colornames.h
//		HTML like color names
//

#pragma once
#pragma message("including " __FILE__)

namespace GE_ { namespace winx { 

	struct clrname {
		static const COLORREF AliceBlue            = RGB(240,248,255);
		static const COLORREF AntiqueWhite         = RGB(250,235,215);
		static const COLORREF Aqua                 = RGB(  0,255,255);
		static const COLORREF Aquamarine           = RGB(127,255,212); 
		static const COLORREF Azure                = RGB(240,255,255);
		static const COLORREF Beige                = RGB(245,245,220);
		static const COLORREF Bisque               = RGB(255,228,196);
		static const COLORREF Black                = RGB(  0,  0,  0);
		static const COLORREF BlanchedAlmond       = RGB(255,255,205);
		static const COLORREF Blue                 = RGB(  0,  0,255);
		static const COLORREF BlueViolet           = RGB(138, 43,226);
		static const COLORREF Brown                = RGB(165, 42, 42);
		static const COLORREF Burlywood            = RGB(222,184,135);
		static const COLORREF CadetBlue            = RGB( 95,158,160);
		static const COLORREF Chartreuse           = RGB(127,255,  0);
		static const COLORREF Choate			   = RGB(210,105, 30);
		static const COLORREF Coral                = RGB(255,127, 80);
		static const COLORREF CornflowerBlue       = RGB(100,149,237);
		static const COLORREF Cornsilk             = RGB(255,248,220);
		static const COLORREF Crimson              = RGB(220, 20, 60);
		static const COLORREF Cyan                 = RGB(  0,255,255);
		static const COLORREF DarkBlue             = RGB(  0,  0,139);
		static const COLORREF DarkCyan             = RGB(  0,139,139);
		static const COLORREF DarkGoldenRod        = RGB(184,134, 11); 
		static const COLORREF DarkGray             = RGB(169,169,169);
		static const COLORREF DarkGreen            = RGB(  0,100,  0);
		static const COLORREF DarkKhaki            = RGB(189,183,107);
		static const COLORREF DarkMagenta          = RGB(139,  0,139);
		static const COLORREF DarkOliveGreen       = RGB( 85,107, 47); 
		static const COLORREF DarkOrange           = RGB(255,140,  0); 
		static const COLORREF DarkOrchid           = RGB(153, 50,204);
		static const COLORREF DarkRed              = RGB(139,  0,  0);
		static const COLORREF DarkSalmon           = RGB(233,150,122);
		static const COLORREF DarkSeaGreen         = RGB(143,188,143);
		static const COLORREF DarkSlateBlue        = RGB( 72, 61,139);
		static const COLORREF DarkSlateGray        = RGB( 47, 79, 79);
		static const COLORREF DarkTurquoise        = RGB(  0,206,209);
		static const COLORREF DarkViolet           = RGB(148,  0,211);
		static const COLORREF DeepPink             = RGB(255, 20,147);
		static const COLORREF DeepSkyBlue          = RGB(  0,191,255);
		static const COLORREF DimGray              = RGB(105,105,105);
		static const COLORREF DodgerBlue           = RGB( 30,144,255);
		static const COLORREF FireBrick            = RGB(178, 34, 34);
		static const COLORREF FloralWhite          = RGB(255,250,240);
		static const COLORREF ForestGreen          = RGB( 34,139, 34);
		static const COLORREF Fuchsia              = RGB(255,  0,255);
		static const COLORREF Gainsboro            = RGB(220,220,220);
		static const COLORREF GhostWhite           = RGB(248,248,255);
		static const COLORREF Gold                 = RGB(255,215,  0);
		static const COLORREF GoldenRod            = RGB(218,165, 32);
		static const COLORREF Gray                 = RGB(127,127,127);
		static const COLORREF Green                = RGB(  0,128,  0);
		static const COLORREF GreenYellow          = RGB(173,255, 47);
		static const COLORREF HoneyDew             = RGB(240,255,240);
		static const COLORREF HotPink              = RGB(255,105,180);
		static const COLORREF IndianRed            = RGB(205, 92, 92);
		static const COLORREF Indigo               = RGB( 75,  0,130);
		static const COLORREF Ivory                = RGB(255,255,240);
		static const COLORREF Khaki                = RGB(240,230,140);
		static const COLORREF Lavender             = RGB(230,230,250);
		static const COLORREF LavenderBlush        = RGB(255,240,245);
		static const COLORREF Lawngreen            = RGB(124,252,  0);
		static const COLORREF LemonChiffon         = RGB(255,250,205);
		static const COLORREF LightBlue            = RGB(173,216,230);
		static const COLORREF LightCoral           = RGB(240,128,128);
		static const COLORREF LightCyan            = RGB(224,255,255);
		static const COLORREF LightGoldenRodYellow = RGB(250,250,210);
		static const COLORREF LightGreen           = RGB(144,238,144);
		static const COLORREF LightGrey            = RGB(211,211,211);
		static const COLORREF LightPink            = RGB(255,182,193);
		static const COLORREF LightSalmon          = RGB(255,160,122);
		static const COLORREF LightSeaGreen        = RGB( 32,178,170);
		static const COLORREF LightSkyBlue         = RGB(135,206,250);
		static const COLORREF LightSlateGray       = RGB(119,136,153);
		static const COLORREF LightSteelBlue       = RGB(176,196,222);
		static const COLORREF LightYellow          = RGB(255,255,224);
		static const COLORREF Lime                 = RGB(  0,255,  0);
		static const COLORREF LimeGreen            = RGB( 50,205, 50);
		static const COLORREF Linen                = RGB(250,240,230);
		static const COLORREF Magenta              = RGB(255,  0,255);
		static const COLORREF Maroon               = RGB(128,  0,  0);
		static const COLORREF MediumAquamarine     = RGB(102,205,170);
		static const COLORREF MediumBlue           = RGB(  0,  0,205);
		static const COLORREF MediumOrchid         = RGB(186, 85,211);
		static const COLORREF MediumPurple         = RGB(147,112,219);
		static const COLORREF MediumSeaGreen       = RGB( 60,179,113);
		static const COLORREF MediumSlateBlue      = RGB(123,104,238);
		static const COLORREF MediumSpringGreen    = RGB(  0,250,154);
		static const COLORREF MediumTurquoise      = RGB( 72,209,204);
		static const COLORREF MediumVioletRed      = RGB(199, 21,133);
		static const COLORREF MidnightBlue         = RGB( 25, 25,112);
		static const COLORREF MintCream            = RGB(245,255,250);
		static const COLORREF MistyRose            = RGB(255,228,225);
		static const COLORREF Moccasin             = RGB(255,228,181);
		static const COLORREF NavajoWhite          = RGB(255,222,173);
		static const COLORREF Navy                 = RGB(  0,  0,128);
		static const COLORREF Navyblue             = RGB(159,175,223);
		static const COLORREF OldLace              = RGB(253,245,230);
		static const COLORREF Olive                = RGB(128,128,  0);
		static const COLORREF OliveDrab            = RGB(107,142, 35);
		static const COLORREF Orange               = RGB(255,165,  0);
		static const COLORREF OrangeRed            = RGB(255, 69,  0);
		static const COLORREF Orchid               = RGB(218,112,214);
		static const COLORREF PaleGoldenRod        = RGB(238,232,170);
		static const COLORREF PaleGreen            = RGB(152,251,152);
		static const COLORREF PaleTurquoise        = RGB(175,238,238);
		static const COLORREF PaleVioletRed        = RGB(219,112,147);
		static const COLORREF PapayaWhip           = RGB(255,239,213);
		static const COLORREF PeachPuff            = RGB(255,218,185);
		static const COLORREF Peru                 = RGB(205,133, 63);
		static const COLORREF Pink                 = RGB(255,192,203);
		static const COLORREF Plum                 = RGB(221,160,221);
		static const COLORREF PowderBlue           = RGB(176,224,230);
		static const COLORREF Purple               = RGB(128,  0,128);
		static const COLORREF Red                  = RGB(255,  0,  0);
		static const COLORREF RosyBrown            = RGB(188,143,143);
		static const COLORREF RoyalBlue            = RGB( 65,105,225);
		static const COLORREF SaddleBrown          = RGB(139, 69, 19);
		static const COLORREF Salmon               = RGB(250,128,114);
		static const COLORREF SandyBrown           = RGB(244,164, 96);
		static const COLORREF SeaGreen             = RGB( 46,139, 87);
		static const COLORREF SeaShell             = RGB(255,245,238);
		static const COLORREF Sienna               = RGB(160, 82, 45);
		static const COLORREF Silver               = RGB(192,192,192);
		static const COLORREF SkyBlue              = RGB(135,206,235);
		static const COLORREF SlateBlue            = RGB(106, 90,205);
		static const COLORREF SlateGray            = RGB(112,128,144);
		static const COLORREF Snow                 = RGB(255,250,250);
		static const COLORREF SpringGreen          = RGB(  0,255,127);
		static const COLORREF SteelBlue            = RGB( 70,130,180);
		static const COLORREF Tan                  = RGB(210,180,140);
		static const COLORREF Teal                 = RGB(  0,128,128);
		static const COLORREF Thistle              = RGB(216,191,216);
		static const COLORREF Tomato               = RGB(255, 99, 71);
		static const COLORREF Turquoise            = RGB( 64,224,208);
		static const COLORREF Violet               = RGB(238,130,238);
		static const COLORREF Wheat                = RGB(245,222,179);
		static const COLORREF White                = RGB(255,255,255);
		static const COLORREF WhiteSmoke           = RGB(245,245,245);
		static const COLORREF Yellow               = RGB(255,255,  0);
		static const COLORREF YellowGreen          = RGB(139,205, 50);

	};
}}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Italy Italy
Born and living in Milan (Italy), I'm an engineer in electronics actually working in the ICT department of an important oil/gas & energy company as responsible for planning and engineering of ICT infrastructures.
Interested in programming since the '70s, today I still define architectures for the ICT, deploying dedicated specific client application for engineering purposes, working with C++, MFC, STL, and recently also C# and D.

Comments and Discussions