flat assembler
Message board for the users of flat assembler.

Index > Windows > Accepting dropped files from a control

Author
Thread Post new topic Reply to topic
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM
I have a pair of edit boxes in a dialog, and I would like to be able to receive files through these. How would I go about doing this? BTW, I have to be able to know which control was dropped into.

_________________
This calls for... Ultra CRUNCHY Man!
Ta da!! *crunch*
Post 25 Jul 2006, 20:47
View user's profile Send private message Reply with quote
wisepenguin



Joined: 30 Mar 2005
Posts: 129
wisepenguin
DragAcceptFiles
DragQueryFile
WM_DROPFILES are things you should look for in the platform SDK

i think they're the functions, you tell Windows which "window" you
want to get dropped files and handle the WM_DROPFILES message
which has an array of filenames that are dropped

for your sample, im not sure whether it would work but pass the hWnd
of each edit control to a call to DragAcceptFiles
Post 25 Jul 2006, 21:08
View user's profile Send private message Reply with quote
UCM



Joined: 25 Feb 2005
Posts: 285
Location: Canada
UCM
Yes, I know these, but how would I capture the WM_DROPFILES messages? Are they sent to the edit control, or to the dialog?
Post 25 Jul 2006, 21:32
View user's profile Send private message Reply with quote
wisepenguin



Joined: 30 Mar 2005
Posts: 129
wisepenguin
oh right sorry.

yes you need to handle the WM_DROPFILES in the WindowProc of the hWnd you sent to DragAcceptFiles.

for edit controls, you will need to call SetWIndowLong, hEdit, GWL_WNDPROC, newwndprocaddress

and in that windowproc you need CallWindowProc, oldwindproc etc

DragAcceptFiles, hWnd, activate
the hWnd you pass is the one that is used for notification

hope that clears it up for you
Post 26 Jul 2006, 12:11
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.