Vcl.Graphics.TCanvas.CreateHandle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure CreateHandle; virtual;

C++

virtual void __fastcall CreateHandle();

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Graphics.pas
Vcl.Graphics.hpp
Vcl.Graphics TCanvas

Description

Allocates a new handle for the canvas.

CreateHandle is called automatically by the canvas when a handle is required. In TCanvas, CreateHandle simply returns without allocating a handle. CreateHandle is supposed to be overridden in descending classes, which, in certain conditions, allocate handles.

For example, TControlCanvas returns the HDC (Windows Device Context handle) for the control the canvas is associated to.

See Also