Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get File References from Clipboard
Message
 
To
08/07/2002 12:36:41
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00676199
Message ID:
00903132
Views:
24
Hi Darren,

There's a solution based on API functions. Open the clipboard and enumerate existing data formats. If you have some files selected and copied from the Explorer, then probably you will find data in formats like

Shell IDList Array
List of files
FileName
FileNameW

Use APIs GetClipboardData (returns a pointer), GlobalSize and CopyMemory to get data for each format.

The FileName and the FileNameW both store name of the file you right-clicked on. The Shell IDList Array and the List of files store list of selected files in some kind of proprietary Windows formats, search Google for more details.

* * *
FoxPro code sample (members area):
Enumerating data formats currently available on the clipboard
http://www.news2news.com/vfp/?example=32&function=42

API Functions used
CloseClipboard
EnumClipboardFormats
GetClipboardData
GetClipboardFormatName
GlobalSize
OpenClipboard
Previous
Reply
Map
View

Click here to load this message in the networking platform