Public Types | |
Static = COLOR_STATIC | |
WINCE. | |
enum | SysColor { , Static = COLOR_STATIC , Static = COLOR_STATIC } |
Public Member Functions | |
Brush (Canvas &canvas) | |
Static Constructor returning a "NULL_BRUSH". | |
Brush (Canvas &canvas, SysColor color) | |
Constructor taking a Canvas and a syscolorbrush enum. | |
Brush (Canvas &canvas, BitmapPtr bitmap) | |
Constructor taking a Canvas and a COLORREF. | |
Brush (Canvas &canvas, COLORREF color) | |
Constructor taking a Canvas and a COLORREF. | |
HBRUSH | getBrushHandle () |
Returns the Handle to the brush. | |
Canvas & | getCanvas () |
Returns the Device Context of the brush. | |
~Brush () | |
Automatically restores the old brush and frees the given brush. |
Constructor takes a COLORREF which can be obtained by using e.g. the RGB macro.
Class ensures that your brush is released and the former one is reactivated.
Automatically resets back to the former used brush when object is destroyed.
The hdc parameter to the Constructor is the Device Context for the brush.
Related classes
enum SysColor |
Constructor taking a Canvas and a COLORREF.
Build a COLORREF argument with windows.h's RGB( red, green, blue )
Constructor taking a Canvas and a COLORREF.
Build a COLORREF argument with windows.h's RGB( red, green, blue )
Constructor taking a Canvas and a syscolorbrush enum.
A syscolorbrush is one of the system brushes used to draw e.g. Buttons, Text, etc. Use this Constructor if you wish to use one of those cached brushes instead of creating your own
~Brush | ( | ) |
HBRUSH getBrushHandle | ( | ) |
Returns the Handle to the brush.
Returns the Handle to the brush
Canvas & getCanvas | ( | ) |
Returns the Device Context of the brush.
Normally the same as the "parent" object used to construct the Pen