Vcl.Controls.TControl.GetDeviceContext

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetDeviceContext(var WindowHandle: HWND): HDC; overload; virtual;

C++

virtual HDC __fastcall GetDeviceContext(HWND &WindowHandle)/* overload */;

Properties

Type Visibility Source Unit Parent
function protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TControl

Description

Returns a device context for the control.

Call GetDeviceContext to obtain a device context and window handle. Override GetDeviceContext to change how the device context is obtained.

The window handle used by the control is returned in the WindowHandle parameter. GetDeviceContext returns the device context of this, the parent control's window.

See Also

Code Examples