1. RE: drag-n-drop
> From: Kat [mailto:gertie at PELL.NET]
> I seem to remember this was a topic a while ago, but i don't
> remember if it was solved.
> Has anyone put an icon on the desktop as an Eu program, and
> been able to drag/drop
> things onto it for the Eu program to recieve and do things with?
Have you tried using the win32lib event onDragAndDrop? It should work with
both external drops and internal (although I've never played with dropping
files--just listview items).
Matt Lewis
2. RE: drag-n-drop
On 5 Feb 2001, at 12:12, Matthew Lewis wrote:
>
> > From: Kat [mailto:gertie at PELL.NET]
>
> > I seem to remember this was a topic a while ago, but i don't
> > remember if it was solved.
> > Has anyone put an icon on the desktop as an Eu program, and
> > been able to drag/drop
> > things onto it for the Eu program to recieve and do things with?
>
> Have you tried using the win32lib event onDragAndDrop? It should work with
> both external drops and internal (although I've never played with dropping
> files--just listview items).
Ack, err, <cough> no, i haven't. What version of win32lib should i use for that?
<duck>
Tiggr is still on ..
-- "Bleeding Edge" 0.42e
-- (c) 1999 David Cuny
but someone asked for an application to make his life easier (and his company
more
productive), and it entails dropping text files, html files, and various pic
files onto an
icon on the desktop, and the icon's program doing things to the file dropped
onto it,
and i haven't gotten into windoze programming except as *necessary*. This might
be
useful tho.
Kat,
feeling like she is looking at yet another ball of yarn
3. RE: drag-n-drop
Hi Kat,
As an experiment, drag a filename onto your exe program icon and
have your program print the command_line() values.
This will show you what is passed to your exe program
when you drag a filename onto your icon.
Also, a while back i made a drag and drop program
for exw programs, so you can drag and drop filenames
into the exw program for testing while the program is still
in exw form, if anyone is interested ill post it.
Bye for now.
--Al
4. RE: drag-n-drop
On 5 Feb 2001, at 12:36, Al Getz wrote:
> Hi Kat,
> As an experiment, drag a filename onto your exe program icon and
> have your program print the command_line() values.
> This will show you what is passed to your exe program
> when you drag a filename onto your icon.
>
> Also, a while back i made a drag and drop program
> for exw programs, so you can drag and drop filenames
> into the exw program for testing while the program is still
> in exw form, if anyone is interested ill post it.
Of course we are interested!!
Kat
5. RE: drag-n-drop
> -----Original Message-----
> From: Kat [mailto:gertie at PELL.NET]
> Ack, err, <cough> no, i haven't. What version of win32lib
> should i use for that? <duck>
> Tiggr is still on ..
> -- "Bleeding Edge" 0.42e
> -- (c) 1999 David Cuny
>
> but someone asked for an application to make his life easier
> (and his company more
> productive), and it entails dropping text files, html files,
> and various pic files onto an
> icon on the desktop, and the icon's program doing things to
> the file dropped onto it,
> and i haven't gotten into windoze programming except as
> *necessary*. This might be
> useful tho.
>
Here's some code that should work w/v42e (based on what's in 51.1--don't be
surprised if some typos exist below):
constant
xDragQueryFile = define_c_func(shell32, "DragQueryFileA",
{C_POINTER, C_INT, C_POINTER, C_INT}, C_INT),
WM_DROPFILES = #233
procedure main_onevent( atom hWnd, integer iMsg, atom wParam, atom lParam )
integer index, bufferSize, itemCount
atom buffer
sequence fileName
if iMsg = WM_DROPFILES then
-- set up data structures
index = -1 -- 'return the number of filenames'
bufferSize = 256
buffer = allocate( bufferSize )
-- get the count of files
itemCount = w32Func(xDragQueryFile,{wParam, index, buffer,
bufferSize})
-- DragQueryFileA uses zero based indexing
for i = 0 to itemCount - 1 do
-- get position of file name in the buffer
index = w32Func(xDragQueryFile,{wParam, i, buffer, bufferSize})
-- get the file name
fileName &= peek({buffer, index})
-- Insert whatever you want to do with the files here...
end for
-- Free the memory
free( buffer )
end if
end procedure
onEvent[Main] = routine_id("main_onevent")
Matt Lewis