CDC::Attach 

BOOLAttach(HDChDC**);**

Return Value

Nonzero if the function is successful; otherwise 0.

Parameters

hDC

A Windows device context.

Remarks

Use this member function to attach an hDC to the CDC object. The hDC is stored in both m_hDC, the output device context, and in m_hAttribDC, the attribute device context.

CDC OverviewClass MembersHierarchy Chart

See Also   CDC::Detach, CDC::m_hDC, CDC::m_hAttribDC