Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.32 KB

device-context-global-functions.md

File metadata and controls

48 lines (31 loc) · 1.32 KB
description title ms.date f1_keywords ms.assetid
Learn more about: Device Context Global Functions
Device Context Global Functions
11/04/2016
atlwin/ATL::AtlCreateTargetDC
08ec28f6-daff-4882-9544-e8a4639d05c4

Device Context Global Functions

This function creates a device context for a given device.

Name Description
AtlCreateTargetDC Creates a device context.

AtlCreateTargetDC

Creates a device context for the device specified in the DVTARGETDEVICE structure.

HDC AtlCreateTargetDC(HDC hdc, DVTARGETDEVICE* ptd);

Parameters

hdc
[in] The existing handle of a device context, or NULL.

ptd
[in] A pointer to the DVTARGETDEVICE structure that contains information about the target device.

Return Value

Returns the handle to a device context for the device specified in the DVTARGETDEVICE. If no device is specified, returns the handle to the default display device.

Remarks

If the structure is NULL and hdc is NULL, creates a device context for the default display device.

If hdc is not NULL and ptd is NULL, the function returns the existing hdc.

Requirements

Header: atlwin.h

See also

Functions