[Overview][Types][Classes][Index] | Reference for unit 'WSReferences' (#lcl)

# TLCLHandle

The type used for handles in LCL applications, components, controls, and widget set classes.

## Declaration

Source position: wsreferences.pp line 30

`type TLCLHandle = PtrUInt;`

## Description

TLCLHandle is an alias for the PtrUInt (Pointer to Unsigned Integer) type, and the type used to represent handles in the Lazarus Component Library (LCL).

TLCLHandle differentiates the handle type used in LCL from the THandle type used in the FPC Run-time Library (RTL) and numerous other libraries. It is needed because the RTL THandle type is a longint (signed) value on 64-bit Linux platforms and not suitable for use as a window handle in the multi-platform LCL.

TLCLHandle is the type used to represent all handles for an application, controls, and components in the LCL - including those in widgetset class instances. In the LCL type system, it is equivalent to HWND (and related identifiers like HDC, HFONT, HICON, HBRUSH, et. al.) used to identify window objects and resources. TLCLHandle is one of the values that can be returned by the TWSReference class used for widgetset class references (The other is a Pointer to the TLCLHandle type).

TLCLHandle is used in the implementation of classes like:

- TApplication
- TLCLComponent
- TLCLReferenceComponent
- TCustomBitBtn
- TCustomTimer
- TCommonDialog
- TScreen
- TGraphic
- TPicture
- TSharedRasterImage
- TRasterImage
- TCustomBitmap
- TSharedIcon
- TCustomIcon
- TIcon
- TBrush
- TPen
- TCursorImage
- TCustomImageList
- TCustomImageListResolution
- TChangeLink
- TRegion
- TTreeNode
- TTreeNodes

Remark: | TLCLHandle is the replacement for the redefined THandle alias in LCL versions prior to 4.0. THandle is deprecated in LCL 4.0; TLCLHandle is used instead. THandle is still used in the FPC RTL (and in LazUtils) to represent files, file or handle streams, sockets, IO devices, processes, etc.

## See also

LCLType.TLCLHandle |  | Alias to the TLCLHandle type defined for widgetset references.
TLCLComponent |  | The base class for LCL components which have an associated widget.
TLCLReferenceComponent |  | Base class for all components having an associated widget with a handle.