A Google Csoportok már nem támogatja az új Usenet-bejegyzéseket és -feliratkozásokat. A korábbi tartalmak továbbra is megtekinthetők.

Drag and Drop WIMP question

0 megtekintés
Ugrás az első olvasatlan üzenetre

polas

olvasatlan,
2007. márc. 16. 6:21:272007. 03. 16.
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

olvasatlan,
2007. márc. 16. 15:52:082007. 03. 16.
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

olvasatlan,
2007. márc. 20. 5:50:032007. 03. 20.
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 új üzenet