Vcl.Controls.TControl.GetDeviceContext
Delphi
function GetDeviceContext(var WindowHandle: HWND): HDC; overload; virtual;
C++
virtual HDC __fastcall GetDeviceContext(HWND &WindowHandle)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | protected | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
説明
コントロールのデバイスコンテキストを返します。
GetDeviceContext メソッドを呼び出すと,デバイスコンテキストおよびウィンドウハンドルを取得できます。GetDeviceContext メソッドをオーバーライドすると,デバイスコンテキストの取得方法を変更できます。
WindowHandle パラメータで,コントロールによって使用されているウィンドウハンドルが返されます。GetDeviceContext は,this,つまり親コントロールのウィンドウのデバイスコンテキストを返します。