## wxFileDropTarget

A drop target which accepts files (dragged from File Manager or Explorer).

Derived from

wxDropTarget

Include files

<wx/dnd.h>

See also

Drag and drop overview, wxDropSource, wxDropTarget, wxTextDropTarget

Members

wxFileDropTarget::wxFileDropTarget
wxFileDropTarget::OnDrop
wxFileDropTarget::OnDropFiles

### wxFileDropTarget::wxFileDropTarget

wxFileDropTarget()

Constructor.

### wxFileDropTarget::OnDrop

virtual bool OnDrop(long x, long y, const void *data, size_t size)

See wxDropTarget::OnDrop. This function is implemented appropriately for files, and calls wxFileDropTarget::OnDropFiles.

### wxFileDropTarget::OnDropFiles

virtual bool OnDropFiles(long x, long y, size_t nFiles, const char * constfiles[])

Override this function to receive dropped files.

Parameters

x

The x coordinate of the mouse.

y

The y coordinate of the mouse.

nFiles

The number of files being dropped.

files

An array of filenames.

Return value

Return TRUE to accept the data, FALSE to veto the operation.