Show: Delphi C++
Display Preferences

Vcl.Controls.TWinControl.DestroyHandle

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DestroyHandle; virtual;

C++

virtual void __fastcall DestroyHandle();

Properties

Type Visibility Source Unit Parent
procedure
function
protected
Vcl.Controls.pas
Vcl.Controls.hpp
Vcl.Controls TWinControl

Description

Destroys the control's window without destroying the control.

Call DestroyHandle to dispose of the window, but leave the control intact. The control can later recreate the window if needed. DestroyHandle is the converse operation to CreateHandle. Applications should call the high-level CreateHandle and DestroyHandle methods, rather than the lower-level methods of CreateWnd and DestroyWnd, whenever possible.

If the control has TWinControl objects as child controls, DestroyHandle calls each of their DestroyHandle methods before calling DestroyWnd to destroy its own handle.

See Also

Personal tools
In Other Languages
Previous Versions
Assistance