Graphics::Graphics(HDC,HANDLE) method (gdiplusgraphics.h)

Creates a Graphics::Graphics object that is associated with a specified device context and a specified device.

Syntax

void Graphics(
  [in] HDC    hdc,
  [in] HANDLE hdevice
);

Parameters

[in] hdc

Type: HDC

Handle to a device context that will be associated with the new Graphics::Graphics object.

[in] hdevice

Type: HANDLE

Handle to a device that will be associated with the new Graphics::Graphics object.

Return value

None

Remarks

When you use this constructor to create a Graphics::Graphics object, make sure that the Graphics::Graphics object is deleted or goes out of scope before the device context is released.

Requirements

Requirement Value
Minimum supported client Windows XP, Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header gdiplusgraphics.h (include Gdiplus.h)
Library Gdiplus.lib
DLL Gdiplus.dll

See also

Changes in the Programming Model

Graphics

Graphics Constructors

Optimizing Printing by Providing a Printer Handle