windows.dragdrop-listener: add a helper word

modern-harvey2
Alexander Iljin 2017-08-18 00:43:51 +03:00
parent 5c0ca7c41b
commit cc5333694a
1 changed files with 4 additions and 1 deletions

View File

@ -7,8 +7,11 @@ windows.shell32 windows.types ;
SPECIALIZED-ARRAY: WCHAR
IN: windows.dragdrop-listener
: filecount-from-hdrop ( hdrop -- n )
0xFFFFFFFF f 0 DragQueryFile ;
: filenames-from-hdrop ( hdrop -- filenames )
dup 0xFFFFFFFF f 0 DragQueryFile ! get count of files
dup filecount-from-hdrop
[
2dup f 0 DragQueryFile 1 + ! get size of filename buffer
dup WCHAR <c-array>