Пример #1
0
HDC LKSurface::Detach() {
    HDC hDC = _OutputDC;
    ReleaseAttribDC();
    ReleaseTempDC();
    _OutputDC = NULL;
    return hDC;
}
Пример #2
0
HDC CDC::Detach()
{
	HDC hDC = m_hDC;
	if (hDC != NULL)
	{
		CHandleMap* pMap = afxMapHDC(); // don't create if not exist
		if (pMap != NULL)
			pMap->RemoveHandle(m_hDC);
	}

	ReleaseAttribDC();
	m_hDC = NULL;
	return hDC;
}