CPaintGraphicsContext Class

class CPaintGraphicsContext: public CGraphicsContext

Device context for a window's invalid region.

Defined in: GraphicContext.h

Comments

The CPaintGraphicsContext class uses the function pair BeginPaint()/EndPaint() to allocate a device context which is only valid during the processing of the WM_PAINT message.
The DC is automatically initialized to have its clipping region equal to the invalid region of the window.

Class Members

CPaintGraphicsContext([HDC h])

Attach constructor. Attaches the given DC handle to this instance.

CPaintGraphicsContext(HWND hWnd)

Creates a new paint DC on the given window and attaches it to this instance.

void  Create(HWND hWnd)

Creates a new paint DC on the given window and attaches it to this instance.