System.Classes.MakeObjectInstance

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MakeObjectInstance(const AMethod: TWndMethod): Pointer;

C++

extern DELPHI_PACKAGE void * __fastcall MakeObjectInstance(const TWndMethod AMethod);

Properties

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

Description

Allocates a block of memory to be used by an instance of a class.

Call MakeObjectInstance to obtain memory to associate with an instance of a class.

This can be particularly useful when using classes that do not have a Windows handle but need to receive Windows Messages. MakeObjectInstance registers a message handling function into the Windows Message Processing Chain, effectively trapping the Windows Messages. This way the messages sent to the parent window are redirected and processed by the correct function.

See Also

Code Examples