* Written by C�dric Moonen (email@example.com)
* This code may be used for any non-commercial and commercial purposes in a compiled form.
* The code may be redistributed as long as it remains unmodified and providing that the
* author name and this disclaimer remain intact. The sources can be modified WITH the author
* consent only.
* This code is provided without any garanties. I cannot be held responsible for the damage or
* the loss of time it causes. Use it at your own risks
* An e-mail to notify me that you are using this code is appreciated also.
//! Types of gradients that can be used
//! A simple horizontal gradient (from the first color to the second)
//! A simple Vertical gradient (from the first color to the second)
//! A double horizontal gradient (first color to second and back to first)
//! A double vertical gradient (first color to second and back to first)
//! Helper class to draw gradient.
It only contains a static function to draw the gradient. This is
mainly used internally.
//! Draws a gradient between two colors inside a rectangle.
The device context with which to draw.
The rectangle in which to draw the gradient
The first gradient color
The second gradient color
The type of gradient to use in the rectangle
static void DrawGradient(CDC* pDC, const CRect& GradientRect, COLORREF Color1,
COLORREF Color2, EGradientType GradientType);
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.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
Microsoft bets on Windows XP disaster