TDropInfo
TDropInfo
Header File
<owl/wsyscls.h>
Description
TDropInfo is a simple class that supports file-name drag and drop operations using the
WM_DROPFILES message. Each TDropInfo object has a private handle to the HDROP structure
returned by the WM_DOPFILES message.
Public Constructors
TDropInfo::TDropInfo
Syntax
TDropInfo(HDROP handle);
Description
Creates a TDropInfo object with Handle set to
the given handle.
Public Member Functions
DragFinish
Syntax
void DragFinish();
Description
Releases any memory allocated for the
transferring of this TDropInfo object's files during drag operations.
DragQueryFile
Syntax
uint DragQueryFile(uint index, char far* name,
uint nameLen);
Description
Retrieves the name of the file and related
information for this i object. If index is set to -1 (0xFFFF), DragQueryFile returns the
number of dropped files. This is equivalent to calling DragQueryFileCount.
If index lies between 0 and the total number of
dropped files for this object, DragQueryFile copies to the name buffer (of length
nameLen bytes) the name of the dropped file that corresponds to index, and returns the
number of bytes actually copied.
If name is 0, DragQueryFile returns the
required buffer size (in bytes) for the given index. This is equivalent to calling
DragQueryFileNameLen.
DragQueryFileCount
Syntax
uint DragQueryFileCount();
Description
Returns the number of dropped files in this
TDropInfo object. This call is equivalent to calling DragQueryFile(-1, 0, 0).
DragQueryFileNameLen
Syntax
uint DragQueryFileNameLen(uint index);
Description
Returns the length of the name of the file in
this TDropInfo object corresponding to the given index. This call is equivalent to calling
DragQueryFile(index, 0, 0).
DragQueryPoint
Syntax
bool DragQueryPoint(TPoint& point);
Description
Retrieves the mouse pointer position when this
object's files are dropped and copies the coordinates to the given point object. point
refers to the window that received the WM_DROPFILES message. DragQueryPoint returns true
if the drop occurs inside the window's client area, otherwise false.
operator HDROP()
Syntax
operator HDROP();
Description
Typecasting operator that returns Handle.
Revised: February 08, 2000.
|