September 2016
Intermediate to advanced
588 pages
12h 22m
English
The Color class is a wrapper class for the Win32 API COLORREF structure, which holds a color in accordance with the Red-Green-Blue (RGB) standard. Each component of the color is represented by a value between 0 and 255, inclusive, which gives a theoretical total number of 2563 = 16,777,216 different colors, among which Color defines 142 standard colors.
Color.h
namespace SmallWindows {
class Color;
extern const Color SystemColor;
The default constructor initializes the color with zero for each of the red, green, and blue values, which corresponds to black. A color object can also be initialized by, and assigned to, another color:
class Color { public: Color(); Color(int red, int green, int blue); Color(const Color& color); Color& ...Read now
Unlock full access