Download Source Code

CGrBrush Class Reference

Wraps the Windows GDI HBRUSH object. More...

#include <GrBrush.h>

List of all members.

Public Member Functions

BOOL Create (HBITMAP hBmp)
 Creates a bitmap brush from an HBITMAP object.
BOOL Create (int nStyle, COLORREF rgb)
 Creates the specified style and color brush.
BOOL Create (COLORREF rgb)
 Creates a solid brush of the specified color.
void Destroy ()
 Releases the brush.
 CGrBrush ()
 Default constructor.
 CGrBrush (HBRUSH hBrush)
 Wraps an existing brush.
 CGrBrush (int nStyle, COLORREF rgb)
 Creates the specified style and color brush.
 CGrBrush (COLORREF rgb)
 Creates a solid brush of the specified color.
 CGrBrush (HBITMAP hBmp)
 Creates a bitmap brush from an HBITMAP object.
virtual ~CGrBrush ()
 Destructor.
 operator HBRUSH ()
 Returns the HBRUSH.
HBRUSH GetSafeHbrush ()
 Returns the HBRUSH.
BOOL IsObject ()
 Returns non-zero if there is a valid HBRUSH handle.
void Attach (HBRUSH hBrush)
 Attaches to an existing HBRUSH object.
HBRUSH Detach ()
 Detaches from an HBRUSH without releasing it.


Detailed Description

Wraps the Windows GDI HBRUSH object.

Simple wrapper class for the windows GDI HBRUSH object.


Constructor & Destructor Documentation

CGrBrush::CGrBrush HBRUSH  hBrush  ) 
 

Wraps an existing brush.

Parameters:
[in] hBrush - Existing HBRUSH object

CGrBrush::CGrBrush int  nStyle,
COLORREF  rgb
 

Creates the specified style and color brush.

Parameters:
[in] nStyle - Brush style
[in] rgb 

CGrBrush::CGrBrush COLORREF  rgb  ) 
 

Creates a solid brush of the specified color.

Parameters:
[in] rgb - Brush color

CGrBrush::CGrBrush HBITMAP  hBmp  ) 
 

Creates a bitmap brush from an HBITMAP object.

Parameters:
[in] hBmp - Valid HBITMAP


Member Function Documentation

void CGrBrush::Attach HBRUSH  hBrush  )  [inline]
 

Attaches to an existing HBRUSH object.

Parameters:
[in] hBrush - Existing HBRUSH object

BOOL CGrBrush::Create COLORREF  rgb  ) 
 

Creates a solid brush of the specified color.

Parameters:
[in] rgb - Brush color
Returns:
Non-zero if success
See also:

BOOL CGrBrush::Create int  nStyle,
COLORREF  rgb
 

Creates the specified style and color brush.

Parameters:
[in] nStyle - Brush style
[in] rgb 
Returns:
Non-zero if success
See also:

BOOL CGrBrush::Create HBITMAP  hBmp  ) 
 

Creates a bitmap brush from an HBITMAP object.

Parameters:
[in] hBmp - Valid HBITMAP
Returns:
Non-zero if success
See also:

HBRUSH CGrBrush::Detach  )  [inline]
 

Detaches from an HBRUSH without releasing it.

Returns:
See also:

HBRUSH CGrBrush::GetSafeHbrush  )  [inline]
 

Returns the HBRUSH.

Returns:
HBRUSH

CGrBrush::operator HBRUSH  )  [inline]
 

Returns the HBRUSH.

Returns:
HBRUSH


The documentation for this class was generated from the following files:
  • inc/GrBrush.h
  • GrBrush.cpp
Copyright Robert Umbehant
This documentation is covered by the LGPL