ItemDragDropData::GetLocation
bool GetLocation (
ULong index,
IO::Location & location
) const;
Parameters
- index
Index of the location we want to acces in a drag and drop operation which contains the 'FILE' drag format. - location
Output parameter: reference to a location with the given index.
Return Value
Description
Example
// Method Example:
void PictureControl::UserItemDropped (const DG::UserItemDropTargetEvent& ev, DG::DragDrop::Effect* /*effect*/)
{
if (ev.HasDataFormat ('FILE')) {
IO::Location fileLoc;
ev.GetLocation (0, fileLoc);
PicHandle pict = NULL;
if (DBERROR (::FMReadImageFile (fileLoc, &pict) != GS::NoError))
return;
sourceDocument->Set (pict);
KillPicture (pict);
}
}Getting out a location when files are present in a drag and drop operation.