System.Classes.DeallocateHWnd

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure DeallocateHWnd(Wnd: HWND);

C++

extern DELPHI_PACKAGE void __fastcall DeallocateHWnd(HWND Wnd);

Properties

Type Visibility Source Unit Parent
procedure
function
public
System.Classes.pas
System.Classes.hpp
System.Classes System.Classes

Description

Frees a window that was created using AllocateHWnd.

Call DeallocateHWnd to free a window that was created using the AllocateHWnd function. Windows must be freed to release the system resources that they consume. You must call DallocateHWnd from the same thread as the corresponding AllocateHwnd call was made.

The Wnd parameter is the window handle of the window to be freed. This value is the same as the handle returned by the call to AllocateHWnd.

Warning: Do not use DeallocateHWnd on the handle of a windowed control. Windowed controls free their handles using the protected DestroyHandle method, which ensures that the control is left in a consistent state.

See Also

Code Examples