[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Controls' (#lcl)

# TCustomControl.DestroyWnd

Destroys the handle for the Canvas and the interface object.

## Declaration

Source position: controls.pp line 2475

`protected procedure TCustomControl.DestroyWnd; override;`

## Description

DestroyWnd is an overridden method in TCustomControl. It ensures that the Handle in Canvas is freed before calling the inherited method.

## See also

TCustomControl.Canvas |  | The drawing surface for the control.
TWinControl.DestroyWnd |  | Destroys the interface object (widget).
TControlCanvas.FreeHandle |  | Frees the Handle for the control canvas, and its device context when assigned.