From RAD Studio API Documentation
Jump to: navigation, search


function AllocateHWnd(const AMethod: TWndMethod): HWND;


extern DELPHI_PACKAGE HWND __fastcall AllocateHWnd(const TWndMethod AMethod);


Type Visibility Source Unit Parent
function public
System.Classes System.Classes


Creates a window that implements a specified window procedure.

Call AllocateHWnd to create a window that is not associated with a windowed control. Typically, this method is used to create non-visual windows that respond to messages but that do not appear in the user interface. For example, the TTimer component uses this method to create a window that responds to timer messages from Windows.

The Method parameter specifies the window procedure that the generated window uses to respond to messages.

AllocateHWnd returns the handle of the newly created window.

Note: Use the DeallocateHWnd procedure to free windows that are created using AllocateHWnd.

See Also

Code Examples