WS_EX_ACCEPTFILES and me
I am trying to figure out how to allow a program to just populate a list of usable files for the program by having the user drag them and drop them on the area but i cant figure out what to do next.
i tried using the WS_EX_ACCEPTFILES in the windows styles but i dont know what to do next
what message does that send when it gets a file? i have played with WM_DROPFILES but i guess i dont totally understand that and it must not be used with ws_ex_accept files unless i am using it wrong or i am not initializing something.
does anyone know what kinda of messages is sent when the WS_EX_ACCEPTFILES message is used? or how to handle it?
dang i always forget this part, i am using win32 api (NO MFC) for this and trying to drop them into a static box in the window
I've never implemented drag-and-drop myself, but as far as I can see, when you receive the WM_DROPFILES message, the wParam is a handle to the dropped files.
First, set an integer to DragQueryFiles(hDrop, 0xFFFFFFFF, NULL, 0) to find out how many files have been dropped, then do a loop with DragQueryFiles(hDrop, i, szFilename, lstrlen(szFilename)) to get each file name in turn.
Finally, call DragFinish(hDrop) to free the system memory used to transfer the information.