Vcl.Graphics.TCanvas.HandleAllocated

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function HandleAllocated: Boolean;

C++

bool __fastcall HandleAllocated();

Properties

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

Description

Indicates whether the TCanvas object has acquired a handle to a device context.

Use HandleAllocated to determine whether the Handle property is set to an HDC value. HandleAllocated indicates whether the canvas has acquired a device context. Use HandleAllocated rather than reading the Handle property. When an application reads the Handle property, TCanvas automatically allocates a new device context and returns its handle if the property had not been previously set.

See Also