Windows C++ Library
Public Types | Public Member Functions | Protected Attributes | Private Member Functions
CDC Class Reference

#include <DC.hpp>

Inheritance diagram for CDC:
CMemDC CPrinterDC CScreenDC

List of all members.

Public Types

enum  Device { Screen, Printer, Metafile }

Public Member Functions

 CDC ()
virtual ~CDC ()
HDC Handle () const
virtual Device Type () const =0
int HorzRes () const
int VertRes () const
CSize TextExtents (const tchar *pszText) const
CSize TextExtents (const CFont &oFont, const tchar *pszText) const
int SaveState ()
bool RestoreState (int iState=-1)
void Select (const CPen &rPen)
void Select (const CBrush &rBrush)
void Select (const CFont &rFont)
void Select (const CBitmap &rBitmap)
int MapMode (int iMode)
void MapMode (const CSize &rDeviceUnits, const CSize &rLogicalUnits)
void ViewportOrigin (int iX, int iY)
void ViewportOrigin (const CPoint &rptOrigin)
void LPtoDP (CPoint *pPoints, int iNumPoints) const
void DPtoLP (CPoint *pPoints, int iNumPoints) const
void Move (int iX, int iY)
void Move (const CPoint &rPoint)
void Line (int iX, int iY)
void Line (const CPoint &rPoint)
void Line (int iSX, int iSY, int iDX, int iDY)
void Line (const CPoint &rSrcPoint, const CPoint &rDstPoint)
void HorzLine3D (int iSX, int iDX, int iY, bool bRaised)
void VertLine3D (int iX, int iSY, int iDY, bool bRaised)
void Border3D (const CRect &rRect, bool bRaised, bool bThick)
void Rectangle (const CRect &rRect)
void Ellipse (const CRect &rRect)
void Arc (const CRect &rRect, const CPoint &ptStart, const CPoint &ptEnd)
void Fill (const CRect &rRect, const CBrush &rBrush)
COLORREF TextColour (COLORREF crColour)
COLORREF BkColour (COLORREF crColour)
int BkMode (int iMode)
void TextOut (int iX, int iY, const tchar *pszText)
void TextOut (const CPoint &rptOrigin, const tchar *pszText)
void DrawText (const CRect &rcRect, const tchar *pszText, int nFormat)
long PointSizeToPixels (long nPointSize) const
 Convert the point size to pixels.
void BitBlt (const CBitmap &rBitmap, const CRect &rcSrc, const CRect &rcDst, DWORD dwRop=SRCCOPY)
void BitBlt (const CTransparentBmp &rBitmap, const CRect &rcSrc, const CRect &rcDst)
void PatBlt (const CRect &rcDst, DWORD dwRop=PATCOPY)

Protected Attributes

HDC m_hDC
bool m_bRelease
int m_iState
HBITMAP m_hOrgBitmap
HBRUSH m_hOrgBrush
HFONT m_hOrgFont
HPALETTE m_hOrgPalette
HPEN m_hOrgPen

Private Member Functions

 CDC (const CDC &)
CDCoperator= (const CDC &)

Member Enumeration Documentation

Enumerator:
Screen 
Printer 
Metafile 

Constructor & Destructor Documentation

CDC::CDC ( )
CDC::~CDC ( ) [virtual]
CDC::CDC ( const CDC ) [private]

Member Function Documentation

HDC CDC::Handle ( ) const [inline]
virtual Device CDC::Type ( ) const [pure virtual]

Implemented in CScreenDC, CPrinterDC, and CMemDC.

int CDC::HorzRes ( ) const [inline]
int CDC::VertRes ( ) const [inline]
CSize CDC::TextExtents ( const tchar *  pszText) const
CSize CDC::TextExtents ( const CFont oFont,
const tchar *  pszText 
) const
int CDC::SaveState ( ) [inline]
bool CDC::RestoreState ( int  iState = -1) [inline]
void CDC::Select ( const CPen rPen) [inline]
void CDC::Select ( const CBrush rBrush) [inline]
void CDC::Select ( const CFont rFont) [inline]
void CDC::Select ( const CBitmap rBitmap) [inline]
int CDC::MapMode ( int  iMode) [inline]
void CDC::MapMode ( const CSize rDeviceUnits,
const CSize rLogicalUnits 
)
void CDC::ViewportOrigin ( int  iX,
int  iY 
) [inline]
void CDC::ViewportOrigin ( const CPoint rptOrigin) [inline]
void CDC::LPtoDP ( CPoint pPoints,
int  iNumPoints 
) const [inline]
void CDC::DPtoLP ( CPoint pPoints,
int  iNumPoints 
) const [inline]
void CDC::Move ( int  iX,
int  iY 
) [inline]
void CDC::Move ( const CPoint rPoint) [inline]
void CDC::Line ( int  iX,
int  iY 
) [inline]
void CDC::Line ( const CPoint rPoint) [inline]
void CDC::Line ( int  iSX,
int  iSY,
int  iDX,
int  iDY 
) [inline]
void CDC::Line ( const CPoint rSrcPoint,
const CPoint rDstPoint 
) [inline]
void CDC::HorzLine3D ( int  iSX,
int  iDX,
int  iY,
bool  bRaised 
)
void CDC::VertLine3D ( int  iX,
int  iSY,
int  iDY,
bool  bRaised 
)
void CDC::Border3D ( const CRect rRect,
bool  bRaised,
bool  bThick 
)
void CDC::Rectangle ( const CRect rRect) [inline]
void CDC::Ellipse ( const CRect rRect) [inline]
void CDC::Arc ( const CRect rRect,
const CPoint ptStart,
const CPoint ptEnd 
) [inline]
void CDC::Fill ( const CRect rRect,
const CBrush rBrush 
) [inline]
COLORREF CDC::TextColour ( COLORREF  crColour) [inline]
COLORREF CDC::BkColour ( COLORREF  crColour) [inline]
int CDC::BkMode ( int  iMode) [inline]
void CDC::TextOut ( int  iX,
int  iY,
const tchar *  pszText 
) [inline]
void CDC::TextOut ( const CPoint rptOrigin,
const tchar *  pszText 
) [inline]
void CDC::DrawText ( const CRect rcRect,
const tchar *  pszText,
int  nFormat 
) [inline]
long CDC::PointSizeToPixels ( long  nPointSize) const [inline]

Convert the point size to pixels.

void CDC::BitBlt ( const CBitmap rBitmap,
const CRect rcSrc,
const CRect rcDst,
DWORD  dwRop = SRCCOPY 
)
void CDC::BitBlt ( const CTransparentBmp rBitmap,
const CRect rcSrc,
const CRect rcDst 
)
void CDC::PatBlt ( const CRect rcDst,
DWORD  dwRop = PATCOPY 
) [inline]
CDC& CDC::operator= ( const CDC ) [private]

Member Data Documentation

HDC CDC::m_hDC [protected]
bool CDC::m_bRelease [protected]
int CDC::m_iState [protected]
HBITMAP CDC::m_hOrgBitmap [protected]
HBRUSH CDC::m_hOrgBrush [protected]
HFONT CDC::m_hOrgFont [protected]
HPALETTE CDC::m_hOrgPalette [protected]
HPEN CDC::m_hOrgPen [protected]

The documentation for this class was generated from the following files: