Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Drag and Drop WIMP question

0 views
Skip to first unread message

polas

unread,
Mar 16, 2007, 6:21:27 AM3/16/07
to
Hello everyone. I have a question about "catching" a drag and drop
event. Although I have programmed in C for a while, I am just learning
about WIMP programming (using Desklib). I have set up a simple window
and got stuff inside it mostly working. However, I have a file icon
and would like to have a handler which is called when a file is
dropped onto that icon. The problem is that I can not find a way of
doing it - I have used event_claim and then event_ANY for that icon,
but no joy for actually dropping files etc.. onto an icon.

I was therefore wondering if this is possible using Desklib and what
call I would use to facilitate it (I have tried looking at the
documentation, examples and PRMs but no joy so far.)


Thanks in advance,
Nick

Adam

unread,
Mar 16, 2007, 3:52:08 PM3/16/07
to
In message <1174040487....@n76g2000hsh.googlegroups.com>, polas wrote:
[snip]

> about WIMP programming (using Desklib). I have set up a simple window
> and got stuff inside it mostly working. However, I have a file icon
> and would like to have a handler which is called when a file is
> dropped onto that icon. The problem is that I can not find a way of
> doing it - I have used event_claim and then event_ANY for that icon,
> but no joy for actually dropping files etc.. onto an icon.

Dragging things between applications (in this case between the filer(?)
and your app) is done using the user messages protocol, so you need to
look at "EventMsg" rather than "Event". E.g.:

EventMsg_Claim(message_DATALOAD, window_handle, your_drag_handler, NULL);

(NULL could obviously be something useful, if need be.)

Adam

--
Adam Richardson Carpe Diem
http://www.snowstone.org.uk/riscos/

polas

unread,
Mar 20, 2007, 5:50:03 AM3/20/07
to
On 16 Mar, 19:52, Adam <n...@snowstone.org.uk> wrote:

Thanks very much for the help - thats a good place for me to start :)

Nick

0 new messages