Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

CDC::operator HDC

Use this operator to retrieve the device context handle of the CDC object.

operator HDC( ) const;

If successful, the handle of the device context object; otherwise, NULL.

You can use the handle to call Windows APIs directly.

Header: afxwin.h

© 2015 Microsoft