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. 類別是實作為IDeviceContext介面的範例。 GraphicsAn example of a class that implements the IDeviceContext interface is the Graphics class.

方法

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。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.

適用於