This method gets a handle to the device context for a control, or creates a compatible off-screen bitmap and gets the device context of that bitmap.
HRESULT GetDC( OLE_HANDLE *phdc, BOOL fOffScreen );
NOERROR indicates success. E_OUTOFMEMORY indicates that the device is out of memory.
Conventional GDI drawing should be done to an offscreen bitmap. When complete, it is then transferred to the screen with either IASCanvas::ClipAndCommit or IASCanvas::Commit. For techniques where the bitmaps already exist, like sprite animation, the offscreen bitmap is not necessary, and should not be created.
IASCanvas::ClipAndCommit, IASCanvas::Commit