OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TDropInfo Class Reference

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, boolDragQueryPoint () 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.
 

Detailed Description

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.

Definition at line 257 of file wsyscls.h.

Constructor & Destructor Documentation

◆ TDropInfo()

owl::TDropInfo::TDropInfo ( HDROP handle)
inline

Creates a TDropInfo object encapsulating the given handle.

Definition at line 262 of file wsyscls.h.

Member Function Documentation

◆ DragFinish()

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().

◆ DragQueryFile() [1/2]

tstring owl::TDropInfo::DragQueryFile ( uint index) const

String-aware overload.

Definition at line 91 of file wsyscls.cpp.

References owl::CopyText(), DragQueryFileNameLen(), and PRECONDITION.

◆ DragQueryFile() [2/2]

uint owl::TDropInfo::DragQueryFile ( uint index,
TCHAR * name,
uint nameLen ) const

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.

◆ DragQueryFileCount()

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().

◆ DragQueryFileNameLen()

uint owl::TDropInfo::DragQueryFileNameLen ( uint index) const

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().

◆ DragQueryPoint() [1/2]

std::pair< TPoint, bool > owl::TDropInfo::DragQueryPoint ( ) const

Functional-style overload.

Definition at line 139 of file wsyscls.cpp.

References DragQueryPoint().

◆ DragQueryPoint() [2/2]

bool owl::TDropInfo::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.

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().

◆ operator HDROP() [1/2]

owl::TDropInfo::operator HDROP ( )
inline

Definition at line 268 of file wsyscls.h.

◆ operator HDROP() [2/2]

owl::TDropInfo::operator HDROP ( ) const
inline

Definition at line 269 of file wsyscls.h.


The documentation for this class was generated from the following files: