共用方式為


Graphics.Graphics(HDC) constructor

Applies to: desktop apps only

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

Syntax

Graphics(
  [in]  HDC hdc
);

Parameters

  • hdc [in]
    Type: HDC

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

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

Minimum supported client

Windows XP, Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Product

GDI+ 1.0

Header

Gdiplusgraphics.h (include Gdiplus.h)

Library

Gdiplus.lib

DLL

Gdiplus.dll

See also

Graphics

Graphics Constructors

Getting Started

Changes in the Programming Model

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012