IPicture::get_CurDC
Returns the
handle of the current device context. This property is valid only for bitmap
pictures.
HRESULT
get_CurDC(
HDC* phdcOut |
//Receives a pointer to device context |
); |
|
Parameters
phdcOut
[out] Pointer
to the caller s variable to receive the device context.
Return Values
This method
supports the standard return value E_FAIL, as well as the following:
S_OK
The device
context was returned successfully.
E_POINTER
The address
in phdcOut is not valid. For example, it may be NULL.
Remarks
The CurDC
property and the IPicture::SelectPicture
Notes to Callers
The caller
always owns any device contexts passed between it and the picture object. Since
the picture object maintains a copy of the HDC, the caller should use a memory
device context (created with the Win32 function CreateCompatibleDC) and
not a screen device context (from GetDC, CreateDC, or BeginPaint),
because the screen device contexts are a limited system resource.
See Also