Download Source Code

CGrPen Class Reference

Simple wrapper for GDI HPEN object. More...

#include <GrPen.h>

List of all members.

Public Member Functions

BOOL Create (int nStyle, int nWidth, COLORREF rgb)
 Creates an HPEN object.
void Destroy ()
 Destroys the encapsulated HPEN object.
 CGrPen ()
 Default constructor.
 CGrPen (HPEN hPen)
 Wraps an existing HPEN object.
 CGrPen (int nStyle, int nWidth, COLORREF rgb)
 Constructs the specified pen.
virtual ~CGrPen ()
 Destructor.
 operator HPEN ()
 Returns encapsulated HPEN handle.
HPEN GetSafeHpen ()
 Returns encapsulated HPEN handle.
BOOL IsObject ()
 Returns non-zero if there is a valid HPEN object.
void Attach (HPEN hPen)
 Encapsulates an existing HPEN object.
void Detach ()
 Detaches from encapsulated HPEN object without releasing it.


Detailed Description

Simple wrapper for GDI HPEN object.

Simple wrapper for GDI HPEN object.


Constructor & Destructor Documentation

CGrPen::CGrPen HPEN  hPen  ) 
 

Wraps an existing HPEN object.

Parameters:
[in] hPen - Existing HPEN object

CGrPen::CGrPen int  nStyle,
int  nWidth,
COLORREF  rgb
 

Constructs the specified pen.

Parameters:
[in] nStyle - Pen style
[in] nWidth - Pen width
[in] rgb - Pen color


Member Function Documentation

void CGrPen::Attach HPEN  hPen  )  [inline]
 

Encapsulates an existing HPEN object.

Parameters:
[in] hPen - Existing HPEN object

BOOL CGrPen::Create int  nStyle,
int  nWidth,
COLORREF  rgb
 

Creates an HPEN object.

Parameters:
[in] nStyle - Pen style
[in] nWidth - Pen width
[in] rgb - Pen color
Returns:
Non-zero if success
See also:


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