CMemDC::CMemDC
Constructs and initializes a CMemDC object.
CMemDC(
CDC& dc,
CWnd* pWnd
);
CMemDC(
CDC& dc,
const CRect& rect
);
Parameters
[in] dc
A reference to the screen device context.[in] pWnd
A pointer to a CWnd Class object whose device context is used for drawing.[in] rect
The bounding rectangle for the drawing area.
Remarks
The first overload takes a pointer to CWnd and determines its client area. The destructor (CMemDC::~CMemDC) copies the contents of the memory device context to the client area.
The second overload specifies a drawing rectangle. The destructor stretches the contents of the memory DC to this rectangle, which makes it possible to draw only part of a window.
Requirements
Header: afxglobals.h