Controls.TWinControl.GetDeviceContext

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Controls.pas

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


Unit: Controls

Type: method

Visibility: protected

Member Of: TWinControl

Description

Provides access to a device context for the control.


Call GetDeviceContext to obtain a handle to a device context for the control.

GetDeviceContext calls the Windows API function GetDC, passing the windowed control's Handle property. It returns the window's handle in the WindowHandle parameter and the HDC as the return value. If the call is unsuccessful, the EOutOfResources exception is raised.

See Also

Code Samples


Personal tools
Translations
Newest Version