Drag and drop events

BlitzMax Forums/BlitzMax Beginners Area/Drag and drop events

julianbury(Posted 2006) [#1]
Greetings, friends :-)

I am trying to write a utility that can compare pairs of files that are dropped, one at a time, onto a pair of text fields where their names and paths should be displayed.

I know this must involve ...

"EVENT_WINDOWACCEPT: Drag and Drop operation was attempted"

But I have never grappled with events of this kind and I need some help in the form of an explanation and an example.

Can anyone help me please?

Thank you for your kind attention,

Julian(^_=)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


CS_TBL(Posted 2006) [#2]
*sigh*, reply lost due server thingies ..

The idea about events:

Nothing happens, until there's an event. You'll get a number of event-properties back from the system, and the combination of properties define which routine to call.
Those properties are for instance:
eventid(), eventdata(), eventx(), eventy(), eventtext(), eventsource() etc.

window=CreateWindow("",0,0,640,480,Null,15|WINDOW_ACCEPTFILES)

Repeat
	WaitEvent()
	If EventID()=EVENT_WINDOWACCEPT
		DebugLog Chr(34)+EventText()+Chr(34)+"   dropped at: ("+EventX()+","+EventY()+")"
	EndIf
	If EventID()=EVENT_WINDOWCLOSE End
Forever