CDC::FromHandle

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

static CDC* PASCAL FromHandle(
   HDC hDC 
);

Параметры

  • hDC
    Contains a handle to a Windows device context.

Возвращаемое значение

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

Заметки

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

Пример

See the example for CPrintDialog::GetPrinterDC.

Требования

Header: afxwin.h

См. также

Основные понятия

CDC Class

CDC Members

Hierarchy Chart

CDC::DeleteTempMap