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

Memory device contexts attach themselves to a bitmap. More...

#include <gdi.h>

Inheritance diagram for MemoryDC:
IDC

Public Member Functions

 MemoryDC (HBITMAP bitmap)
 
 MemoryDC (HDC other, HBITMAP bitmap)
 
HDC _InternalGetHandle ()
 
HBITMAP GetBitmap ()
 
HDC GetHDC ()
 
 operator HDC ()
 
- Public Member Functions inherited from IDC
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

Memory device contexts attach themselves to a bitmap.

The bitmap should not be deleted before the memory DC.

Constructor & Destructor Documentation

MemoryDC::MemoryDC ( HBITMAP  bitmap)
inline

Create DC compatible to the desktop

MemoryDC::MemoryDC ( HDC  other,
HBITMAP  bitmap 
)
inline

Create DC compatible to some other DC.

Member Function Documentation

HDC MemoryDC::_InternalGetHandle ( )
inlinevirtual

Subclasses must override this function to make this interface work.

Returns
Handle of the dc that implements this interface.

Implements IDC.

HBITMAP MemoryDC::GetBitmap ( )
inline
HDC MemoryDC::GetHDC ( )
inline
MemoryDC::operator HDC ( )
inline

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