CDC::FromHandle 

staticCDC*PASCALFromHandle(HDChDC**);**

Return Value

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

Parameters

hDC

Contains a handle to a Windows device context.

Remarks

Returns a pointer to a CDC object when given a handle to a device context. 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.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::DeleteTempMap