API:Vcl.Controls.TWinControl.GetDeviceContext

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

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

Properties

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

Description

Returns a device context for the control.

Vcl.Controls.TWinControl.GetDeviceContext inherits from Vcl.Controls.TControl.GetDeviceContext. All content below this line refers to Vcl.Controls.TControl.GetDeviceContext.

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