Export (0) Print
Expand All
Expand Minimize
0 out of 2 rated this helpful - Rate this topic

CDC::FromHandle

Returns a pointer to a CDC object when given a handle to a device context.

static CDC* PASCAL FromHandle(
   HDC hDC 
);

Parameters

hDC
Contains a handle to a Windows device context.

Return Value

The pointer may be temporary and should not be stored beyond immediate use.

Remarks

If a CDC object is not attached to the handle, a temporary CDC object is created and attached.

Example

See the example for CPrintDialog::GetPrinterDC.

See Also

CDC Overview | Class Members | Hierarchy Chart | CDC::DeleteTempMap

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.