IDeviceContext 接口

定义

定义用于获取并释放 Windows 设备上下文的现有图柄的方法。Defines methods for obtaining and releasing an existing handle to a Windows device context.

public interface class IDeviceContext : IDisposable
public interface IDeviceContext : IDisposable
type IDeviceContext = interface
    interface IDisposable
Public Interface IDeviceContext
Implements IDisposable
派生
实现

注解

设备上下文定义图形对象, 以便在基于 Windows 的设备上进行绘制。A device context defines the graphics object for drawing on a Windows-based device. IDeviceContextGraphics是实现接口的类的一个示例。An example of a class that implements the IDeviceContext interface is the Graphics class.

方法

Dispose()

执行与释放或重置非托管资源关联的应用程序定义的任务。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(继承自 IDisposable)
GetHdc()

返回 Windows 设备上下文的图柄。Returns the handle to a Windows device context.

ReleaseHdc()

释放 Windows 设备上下文的图柄。Releases the handle of a Windows device context.

适用于