OWLNext 7.0
Borland's Object Windows Library for the modern age
|
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES message. More...
#include <owl/wsyscls.h>
Public Member Functions | |
TDropInfo (HDROP handle) | |
Creates a TDropInfo object encapsulating the given handle. | |
void | DragFinish () const |
Releases any memory allocated for the transferring of this TDropInfo object's files during drag operations. | |
operator HDROP () | |
operator HDROP () const | |
tstring | DragQueryFile (uint index) const |
String-aware overload. | |
uint | DragQueryFile (uint index, TCHAR *name, uint nameLen) const |
Retrieves the name of the file and related information for this i object. | |
uint | DragQueryFileCount () const |
Returns the number of dropped files in this TDropInfo object. | |
uint | DragQueryFileNameLen (uint index) const |
Returns the length of the name of the file in this TDropInfo object corresponding to the given index. | |
std::pair< TPoint, bool > | DragQueryPoint () const |
Functional-style overload. | |
bool | DragQueryPoint (TPoint &point) const |
Retrieves the mouse pointer position when this object's files are dropped and copies the coordinates to the given point object. | |
TDropInfo is a simple class that supports file-name drag-and-drop operations using the WM_DROPFILES message.
A TDropInfo object encapsulates a HDROP handle returned by the WM_DROPFILES message.
|
inline |
void owl::TDropInfo::DragFinish | ( | ) | const |
Releases any memory allocated for the transferring of this TDropInfo object's files during drag operations.
Definition at line 70 of file wsyscls.cpp.
References owl::TShell::DragFinish().
String-aware overload.
Definition at line 91 of file wsyscls.cpp.
References owl::CopyText(), DragQueryFileNameLen(), and PRECONDITION.
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.
Definition at line 110 of file wsyscls.cpp.
References owl::TShell::DragQueryFile(), and PRECONDITION.
uint owl::TDropInfo::DragQueryFileCount | ( | ) | const |
Returns the number of dropped files in this TDropInfo object.
This call is equivalent to calling DragQueryFile(-1, 0, 0).
Definition at line 120 of file wsyscls.cpp.
References owl::TShell::DragQueryFile().
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).
Definition at line 130 of file wsyscls.cpp.
References owl::TShell::DragQueryFile().
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.
Definition at line 153 of file wsyscls.cpp.
References owl::TShell::DragQueryPoint().