| |
|
|
|
Description:
DragQueryFile reads whom names one ‚Dropped Files’ from.
Deklaration:
Def DragQueryFile(4) !SHELL32,DragQueryFileA
Parameter:
1.Parameter: lever on a Speicherbereich, the The ‘Dropped Files’ contains. this lever leaves itself over the intercepting the Message WM_DROPFILES (563) find out. 2.Parameter: The with 0 beginnende index (The Ordnungsnummer) the auszulesenden Files or $FFFFFFFF, the number of aufgenommenen Files To experienced . 3.Parameter: at least 261 Bytes large Memory-Variable, The the ausgelesene File aufnimmt. 4.Parameter: The Size the Memory-Variables from Parameter 3 in Bytes.
Return Value:
If in Parameter 2 $ FFFFFFFF indicated watts, The Number of aufgenommenen Files. If one Filename read watts, gives The function The Number of letters in the Filenamen back. If Parameter 3 zero is and the angegebene index existing, becomes The erforderliche Size of Parameter 3 in byte zurückgegeben.
Examples:
CompileMarkSeparationDef DragAcceptFiles(2) !"SHELL32","DragAcceptFiles"
Def DragFinish(1) !"SHELL32","DragFinish"
Def DragQueryFile(4) !"SHELL32","DragQueryFileA"
Declare Filelistbox&,Anzahl&,Zähler&,PFilename#
Windowstyle 31
Windowtitle "Listbox mit File Drag and Drop"
Window 0,0-640,440
Let Filelistbox&=@Createlistbox(%HWND,"",20,20,500,300)
@DragAcceptFiles(FileListbox&,1)
Usermessages 563
While 0=0
waitinput
IF %UMESSAGE=563
DIM PFilename#,261
LET ANZAHL&=@DragQueryFile(&UWParam,$FFFFFFFF,PFilename#,261)
Usecursor 2
While Zähler&<Anzahl&
Clear PFilename#
@DragQueryFile(&UWParam,Zähler&,PFilename#,261)
@AddString(FileListbox&,String$(PFilename#,0))
LET ZÄHLER&=ZÄHLER&+1
wend
Usecursor 0
Dispose PFilename#
@DragFinish(&UWParam)
Endif
Wend
|
|
|
| |
|
|