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

# TScrollingWinControl.DestroyWnd

Frees or invalidates resources in the class instance when the window Handle is freed.

## Declaration

Source position: forms.pp line 183

`protected procedure TScrollingWinControl.DestroyWnd; override;`

## Description

DestroyWnd is an overridden method in TScrollingWinControl used to maintain resources allocated in the class instance when the window Handle for the control is freed. It calls the inherited method on entry to free handles allocated for the control Canvas and the widgetset class instance. It ensures that scroll bar information allocated in either HorzScrollBar or VertScrollBar is invalidated when the handle(s) are freed.

## See also

TScrollingWinControl.HorzScrollBar |  | The horizontal scroll bar for the control.
TScrollingWinControl.VertScrollBar |  | The vertical scroll bar for the control.
TCustomControl.Canvas |  | The drawing surface for the control.
TCustomControl.DestroyWnd |  | Destroys the handle for the Canvas and the interface object.
TWinControl.Handle |  | A reference handle to the widgetset class instance associated with this control.
TWinControl.DestroyHandle |  | Destroys the handle for the control and all child controls.