The device context that the display is currently drawing to. Only valid between calls to StartDrawing and FinishDrawing.
[Visual Basic 6.0] Property hDC As OLE_HANDLE
[Visual Basic .NET] Public ReadOnly Property hDC As Integer
[C#] public int hDC {get;}
[Java]
public gethDC (
OLE_HANDLE hDC
)
[C++]
HRESULT get_hDC(
OLE_HANDLE* hDC
);
Parameters
hDC [out, retval]
hDC is a parameter of type OLE_HANDLE
Returns the device context specified to StartDrawing. This may be the device context of a display, cache (bitmap), or some other device such as a printer. As StartDrawing is called frequently throughout the drawing pipeline, the hDc property continually changes and is therefore safe to use only within a single StartDrawing / FinishDrawing block.
This property does not provide a value to pass to IDisplay::StartDrawing. Instead, call IDisplay::StartDrawing with a value of 0 for the hDC as this will automatically use the Windows API function GetDC to populate IScreenDisplay::WindowDC with the hDC of the main display and drawing will occur there.