WinapiExtension
 All Classes Files Functions Variables Typedefs Pages
Public Member Functions | List of all members
IDC Class Referenceabstract

Interface for device context functions. More...

#include <gdi.h>

Inheritance diagram for IDC:
BaseDC ClientDC MemoryDC PaintDC

Public Member Functions

virtual HDC _InternalGetHandle ()=0
 
BOOL BitBlt (int x, int y, int width, int height, HDC sourceDC, int srcX, int srcY, DWORD rasterOp=SRCCOPY)
 
BOOL BitBlt (const RECT &rect, HDC sourceDC, const POINT &sourcePoint, DWORD rasterOp=SRCCOPY)
 
void DrawText (const tstring &text, RECT &boundingRect, UINT format=DT_LEFT|DT_TOP)
 
void DrawText (const tstring &text, int x, int y)
 
void FillRect (const RECT &r, HBRUSH brush)
 
void FillRegion (HRGN region, HBRUSH brush)
 
Size GetTextSize (const tstring &text, UINT format=DT_LEFT|DT_TOP, LONG maxWidth=LONG_MAX)
 
HGDIOBJ Select (HGDIOBJ object)
 
void SetBkColor (COLORREF color)
 
void SetBkModeOpaque ()
 
void SetBkModeTransparent ()
 
HBRUSH SetBrush (HBRUSH brush)
 
HFONT SetFont (HFONT font)
 
HPEN SetPen (HPEN pen)
 
HRGN SetRegion (HRGN region)
 
int SetStretchBltMode (int mode)
 
void SetTextColor (COLORREF color)
 
BOOL StretchBlt (int x, int y, int width, int height, HDC sourceDC, int srcX, int srcY, int srcWidth, int srcHeight, DWORD rasterOp=SRCCOPY)
 
BOOL StretchBlt (const RECT &rect, HDC sourceDC, const RECT &sourceRect, DWORD rasterOp=SRCCOPY)
 

Detailed Description

Interface for device context functions.

Member Function Documentation

virtual HDC IDC::_InternalGetHandle ( )
pure virtual

Subclasses must override this function to make this interface work.

Returns
Handle of the dc that implements this interface.

Implemented in MemoryDC, ClientDC, PaintDC, and BaseDC.

BOOL IDC::BitBlt ( int  x,
int  y,
int  width,
int  height,
HDC  sourceDC,
int  srcX,
int  srcY,
DWORD  rasterOp = SRCCOPY 
)
inline
BOOL IDC::BitBlt ( const RECT &  rect,
HDC  sourceDC,
const POINT &  sourcePoint,
DWORD  rasterOp = SRCCOPY 
)
inline
void IDC::DrawText ( const tstring text,
RECT &  boundingRect,
UINT  format = DT_LEFT|DT_TOP 
)
inline

Shorthand for DrawText API

void IDC::DrawText ( const tstring text,
int  x,
int  y 
)
inline
void IDC::FillRect ( const RECT &  r,
HBRUSH  brush 
)
inline
void IDC::FillRegion ( HRGN  region,
HBRUSH  brush 
)
inline
Size IDC::GetTextSize ( const tstring text,
UINT  format = DT_LEFT|DT_TOP,
LONG  maxWidth = LONG_MAX 
)
inline
Parameters
formatFlags for the DrawText API
maxWidthHint to limit the result horizontally. If the largest word is wider than maxWidth, maxWidth is ignored.
HGDIOBJ IDC::Select ( HGDIOBJ  object)
inline

Selects an object (brush, pen, font, bitmap, ...) into the device context.

Returns
Previously selected object.
void IDC::SetBkColor ( COLORREF  color)
inline
void IDC::SetBkModeOpaque ( )
inline

Used for text, hatch brushes and non-solid pens

void IDC::SetBkModeTransparent ( )
inline
HBRUSH IDC::SetBrush ( HBRUSH  brush)
inline
HFONT IDC::SetFont ( HFONT  font)
inline
HPEN IDC::SetPen ( HPEN  pen)
inline
HRGN IDC::SetRegion ( HRGN  region)
inline
int IDC::SetStretchBltMode ( int  mode)
inline
Returns
Previous mode
void IDC::SetTextColor ( COLORREF  color)
inline
BOOL IDC::StretchBlt ( int  x,
int  y,
int  width,
int  height,
HDC  sourceDC,
int  srcX,
int  srcY,
int  srcWidth,
int  srcHeight,
DWORD  rasterOp = SRCCOPY 
)
inline
BOOL IDC::StretchBlt ( const RECT &  rect,
HDC  sourceDC,
const RECT &  sourceRect,
DWORD  rasterOp = SRCCOPY 
)
inline

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