Jump to content


Photo

Drag Dll


  • Please log in to reply
21 replies to this topic

#1 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 30 May 2009 - 10:35 PM

I know this has been done a lot before, but I wanted to expand my knowledge of WinAPI, and I wanted to make it easier then ever.


There are only 4 functions in this DLL.
FDrag_Init(); Initializes the DLL.
FDrag_AcceptFiles(accept); True to allow the window to accept files, false to disable.
FDrag_CheckDragNum(); Checks how many files were dropped. Returns -1 if no files have been dropped.
FDrag_CheckDragName(ind); Returns the filename of an index. Eg. 0 returns the filename of the first file dropped. (this is usually 0 unless multiple files were dropped)
FDrag_ResetDrops(); Resets the Drops. Call after processing any drops so you don't process them multiple times.


Download:
Here @ Mediafire

No credit required, But please post here telling me if you have used it in your project(s).

Edited by Revel, 11 May 2010 - 03:08 AM.

  • 1

#2 Inoid

Inoid

    GMC Member

  • New Member
  • 8 posts

Posted 31 May 2009 - 06:06 AM

Hello Revel,

I'm going to use this dll in a project of me. I won't post this project on this forum though, I posted it on a forum with another language.

This dll works fine, even though I had to make the user unable to drag the same file twice. But oh well, that's okay.

Thank you very much for this dll!

Greetings,
Inoid

Ps.

Maybe you could make a function which cleans the list of dropped files (so FDrag_CheckDragNum() returns 0) This could be really helpfull.

Edited by Inoid, 31 May 2009 - 06:09 AM.

  • 0

#3 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 31 May 2009 - 07:27 AM

Ahh. Great suggestion! I didn't know how to prevent users from processing things more than once but I guess it's simple!


The new function is called "FDrag_ResetDrops()". Just call it to clear the drops.


Download
  • 0

#4 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 01 June 2009 - 02:18 AM

Is there any way to reverse the process? By this, I mean is there any way to allow the user to drag something from the GM game window into another window with specified drop data?

-IMP :GM072: :medieval:
  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#5 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 01 June 2009 - 03:46 AM

Not right now, but that's a good idea, and I'll add it soon!
  • 0

#6 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 03 November 2009 - 05:11 AM

I was informed that the link was broken. The link is now fixed, so hopefully I get some more feedback on this DLL.
  • 0

#7 Recreate

Recreate

    Furry

  • GMC Member
  • 2992 posts
  • Version:GM:Studio

Posted 03 November 2009 - 06:56 AM

Woah, this is really usefull, I may use this in one of my projects...(see my signature)
  • 0

If the post that you are reading was created prior to 2011. For the safety of the general public, It is not to be regarded under any circumstances.
Please don't ask me to join your group at anything.


#8 halo shg

halo shg

    Programmer

  • GMC Member
  • 600 posts
  • Version:GM:Studio

Posted 03 November 2009 - 08:42 PM

Neat. Didn't Roach (tangibleLime) make one like this?
  • 0

Dev: MacBook Pro Retina Display 15" w/ Win7 (Parallels) running GM Studio: Master and GM8 (GMS: ANDROID JAVA EXTENSIONS ARE HERE!)
Devices: Samsung Galaxy Note II / Samsung Galaxy S III / iPhone 4S / iPad 2 / iPod Touch 5th gen



Politics' is made up of two words, 'poli,' which is Greek for 'many,' and 'tics,' which are blood-sucking insects.


-Gore Vidal


#9 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 04 November 2009 - 02:48 AM

Neat. Didn't Roach (tangibleLime) make one like this?



Yes he did make one. I made this one mainly for the experience, but decided to release it here on the GMC anyway.
  • 0

#10 Jdream

Jdream

    GMC Member

  • GMC Member
  • 54 posts
  • Version:Unknown

Posted 06 November 2009 - 04:33 PM

Great work, I will be using this in a Game I am making at the moment called BotCodeBattle.

I will be using it so user's can use there own Bot's in game!
  • 0

#11 zezimaimp

zezimaimp

    GMC Member

  • GMC Member
  • 552 posts

Posted 07 December 2009 - 02:15 AM

IDK which of my projects I might use this in, but I will use it at some point, so check up every once in a while! I will give you credit for it!
  • 0
<p align=center><a target=_blank href=http://www.nodiatis.com/personality.htm><img border=0 src=http://www.nodiatis.com/pub/7.jpg></a></p>

#12 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 10 December 2009 - 07:59 PM

Is there any way to reverse the process? By this, I mean is there any way to allow the user to drag something from the GM game window into another window with specified drop data?

-IMP ;) :)



Not right now, but that's a good idea, and I'll add it soon!

Seven months later... how's the progress on this addition coming along?

-IMP ;) :)
  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#13 Revel

Revel

    ɹǝqɯǝɯ ɔɯƃ

  • GMC Member
  • 4935 posts
  • Version:GM8

Posted 11 December 2009 - 12:06 AM

Is there any way to reverse the process? By this, I mean is there any way to allow the user to drag something from the GM game window into another window with specified drop data?

-IMP ;) :)



Not right now, but that's a good idea, and I'll add it soon!

Seven months later... how's the progress on this addition coming along?

-IMP ;) ;)


I can't find any information on how to do this with the Windows API. I could do it using MFC, but I would much rather stick with the regular API. :)

Sorry for not informing you about this earlier...
  • 0

#14 bennelsey

bennelsey

    GMC Member

  • GMC Member
  • 25 posts

Posted 16 January 2010 - 02:18 AM

Posted to say that I'm trying to use this for something that needs players to import images to in-game :3
(just found it nao, but i dont think ill remember this thread when im done xD)
  • 0

#15 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 16 January 2010 - 07:29 AM

I must say that this dll help me alot with making dragable file packer, great job Revel ^^
  • 0

freckles_sign.png


#16 wac2007

wac2007

    GMC Member

  • GMC Member
  • 4 posts

Posted 13 March 2010 - 03:37 AM

Link is offline =/
  • 0

#17 PsichiX

PsichiX

    GMC Member

  • GMC Member
  • 399 posts
  • Version:GM:Studio

Posted 13 March 2010 - 10:28 AM

http://gmclan.org/up...DraggerDLL.html
  • 0

freckles_sign.png


#18 wac2007

wac2007

    GMC Member

  • GMC Member
  • 4 posts

Posted 14 March 2010 - 06:32 PM

Thanks! I really need this!
  • 0

#19 IceMetalPunk

IceMetalPunk

    InfiniteIMPerfection

  • GMC Elder
  • 9603 posts
  • Version:GM:Studio

Posted 15 March 2010 - 04:55 PM

@Revel: I did some research and found a page that seems useful. Unfortunately, I don't know enough C++ to work with this. Maybe you could get some use out of it in implementing drag-out-to-Explorer functionality?

http://www.codeproje...rDelayDrop.aspx

-IMP :GM054: :)

Edited by IceMetalPunk, 15 March 2010 - 04:57 PM.

  • 0

:GM123: Are you an artist who likes creating original creature designs? Maybe you can help out with Elementa here! Give it a look; you might like the idea :)

:bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny: :excl: :bunny:


#20 posva

posva

    GMC Member

  • New Member
  • 610 posts
  • Version:GM8

Posted 25 August 2010 - 03:40 PM

I used that dll for an app that i created for myself but that i'm going to release right now xD
here it is:
it converts GIF files to AVI
it's not usefull but i neede it i wanted to do by myself...

http://www.mediafire...7p8mgxn49iq75mx


http://gmc.yoyogames...howtopic=484500
  • 0

#21 FunnyGames

FunnyGames

    GMC Member

  • GMC Member
  • 362 posts

Posted 21 January 2011 - 09:08 PM

Looks pretty useful, however I don't know how to use it. So I dropped a file to my game, but how do I use my file? You didn't show an example for that... (Checking it's name is not what I actually need).

Thanks for creating it, but please make a tutorial how to use the files you drop in.

Edit:
Never mind, I fount the way how to use it. (Just use it's directory and decide what to do).

Edited by FunnyGames, 22 January 2011 - 08:58 AM.

  • 0

#22 DefuzionGames

DefuzionGames

    GMC Member

  • GMC Member
  • 1460 posts
  • Version:Unknown

Posted 20 May 2012 - 03:09 PM

what about dragging text onto the window?? please pm me
  • 0