TalanSoft Toolkits  201707
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Attributes | List of all members
DC Class Reference

Detailed Description

Device context (DC) wrapper.

Public Member Functions

 DC ()
 
 DC (HWND hWnd)
 
 DC (HDC hDC)
 
virtual ~DC ()
 
void DrawLine (UINT iX1, UINT iY1, UINT iX2, UINT iY2, COLORREF clrColor)
 
void MoveTo (UINT iX, UINT iY)
 
void LineTo (UINT iX, UINT iY, COLORREF clrColor)
 
void LineTo (UINT iX, UINT iY)
 
HFONT CreateAndSelectFont (const CHAR *pszFace, UINT iSize)
 
void CreateCompatible (HDC hDC)
 
void Delete ()
 
int DrawText (const TCHAR *pszString, Rect *rcBounds, UINT iFormat=DT_LEFT|DT_END_ELLIPSIS)
 
BOOL TextOut (const TCHAR *pszString, UINT iX, UINT iY)
 
BOOL SetPixel (UINT iX, UINT iY, COLORREF clrColor)
 
HDC GetDC () const
 
int FillRect (const Rect &rc, HBRUSH hBrush)
 
BOOL DrawFrameControl (Rect *pRect, UINT iType, UINT iState)
 
HGDIOBJ SelectObject (HGDIOBJ hObj)
 
int SetBkMode (INT iMode)
 
COLORREF SetTextColor (COLORREF clrColor)
 
COLORREF SetBkColor (COLORREF clrColor)
 
BOOL Ellipse (int iLeftRect, int iTopRect, int iRightRect, int iBottomRect)
 

Protected Attributes

HDC m_hDC
 

Constructor & Destructor Documentation

DC ( )
DC ( HWND  hWnd)
DC ( HDC  hDC)
virtual ~DC ( )
virtual

Member Function Documentation

void DrawLine ( UINT  iX1,
UINT  iY1,
UINT  iX2,
UINT  iY2,
COLORREF  clrColor 
)
void MoveTo ( UINT  iX,
UINT  iY 
)
void LineTo ( UINT  iX,
UINT  iY,
COLORREF  clrColor 
)
void LineTo ( UINT  iX,
UINT  iY 
)
HFONT CreateAndSelectFont ( const CHAR *  pszFace,
UINT  iSize 
)
Remarks
Caller is responsible for deleting font
void CreateCompatible ( HDC  hDC)
void Delete ( )
int DrawText ( const TCHAR *  pszString,
Rect rcBounds,
UINT  iFormat = DT_LEFT | DT_END_ELLIPSIS 
)
BOOL TextOut ( const TCHAR *  pszString,
UINT  iX,
UINT  iY 
)
BOOL SetPixel ( UINT  iX,
UINT  iY,
COLORREF  clrColor 
)
HDC GetDC ( ) const
int FillRect ( const Rect rc,
HBRUSH  hBrush 
)
BOOL DrawFrameControl ( Rect pRect,
UINT  iType,
UINT  iState 
)
HGDIOBJ SelectObject ( HGDIOBJ  hObj)
int SetBkMode ( INT  iMode)
COLORREF SetTextColor ( COLORREF  clrColor)
COLORREF SetBkColor ( COLORREF  clrColor)
BOOL Ellipse ( int  iLeftRect,
int  iTopRect,
int  iRightRect,
int  iBottomRect 
)

Member Data Documentation

HDC m_hDC
protected