Unicode Controls & Classes for VB6 - Version 4

clsGpGraphics.GetHDC Function

The GetHDC method gets a handle to the device context associated with this Graphics object (returns a standard GDI handle)

Syntax
Public Function GetHDC () As Long
Parameters
Parameter Description
Remarks
Each call to the GetHDC method of a Graphics object should be paired with a call to the
[ReleaseHDC] method of that same Graphics object. Do not call any methods of the Graphics
object between the calls to GetHDC and ReleaseHDC. If you attempt to call a method
of the Graphics object between GetHDC and ReleaseHDC, the method will fail and will return ObjectBusy.
Any state changes you make to the device context between GetHDC and ReleaseHDC will be
ignored by GDI+ and will not be reflected in rendering done by GDI+.