Class TFileDrop (unit FileDrop)

Inherits from

TComponent

Constructors


constructor Create(AOwner: TComponent);



Functions

destructor Destroy;


procedure DestroyControl;

Subclass the owner so this control can capture the WM_DROPFILES message

procedure DropFiles( hDropHandle: HDrop );

Call Win32 API to register the owner as being able to accept dropped files

procedure InitControl;


procedure SetEnabled( Value: Boolean );


procedure SetParentControl(Value : TWinControl);

Restore the original window procedure

procedure WndProc( var Msg: TMessage );

This will result in the OnDrop method being called, if it is defined

Properties

property DropControl : TWinControl


property DropPoint : TPoint


property EnableDrop : Boolean


property FileCount : Integer


property Files : TStrings


Events

event OnDrop : TNotifyEvent


Variables

FDefProc : Pointer;


FDropPt : TPoint;


FEnabled : Boolean;


FNameWithPath : TStrings;


FNumDropped : Integer;


FOnDrop : TNotifyEvent;


FParentControl : TWinControl;


FWndHandle : HWND;


FWndProcInstance : Pointer;



Constructors


constructor Create(AOwner: TComponent);


Functions


destructor Destroy;


procedure DestroyControl;

Subclass the owner so this control can capture the WM_DROPFILES message


procedure DropFiles( hDropHandle: HDrop );

Call Win32 API to register the owner as being able to accept dropped files


procedure InitControl;


procedure SetEnabled( Value: Boolean );


procedure SetParentControl(Value : TWinControl);

Restore the original window procedure


procedure WndProc( var Msg: TMessage );

This will result in the OnDrop method being called, if it is defined


Properties


property DropControl : TWinControl


property DropPoint : TPoint


property EnableDrop : Boolean


property FileCount : Integer


property Files : TStrings


Events


event OnDrop : TNotifyEvent


Variables


FDefProc : Pointer;


FDropPt : TPoint;


FEnabled : Boolean;


FNameWithPath : TStrings;


FNumDropped : Integer;


FOnDrop : TNotifyEvent;


FParentControl : TWinControl;


FWndHandle : HWND;


FWndProcInstance : Pointer;