Jump to content
Sign in to follow this  

Drag&drop On Input Control

Recommended Posts


I try to have drag&drop working on "input" control.

I set exStyles = WS_EX_ACCEPTFILES at the creation time. of an input control.

I add an handling of WM_DROPFILES message in the subclass handler

the case WM_DROPFILES is never exercise. The Spy+ show a message send to the input control handle.

if I do the same at GUI creation I got the message but for the dialog box, not for the input control.

What is wrong with the current implementation of AutoIt3-gui?

Thanks for the help.

Share this post

Link to post
Share on other sites

seems you can set the window to accept files, but not a control, without subclassing the control. It may be useful to handle files dragged onto the window, though a bit weird...


I found that that control cannot receive as you sayI am glad to say that 101.8 will accept drag&drop with


char szFile[_MAX_PATH+1];

POINT Point;

DragQueryPoint((HDROP) wParam, &Point);

HWND hWnd;

hWnd = ChildWindowFromPoint(hDlg,Point);

DragQueryFile((HDROP) wParam, 0, szFile, _MAX_PATH);


DragFinish((HDROP) wParam);

return 0;

I still need to put the caret at the end of the field

I don't plan to drop more that one file

Thanks Larry :whistle:

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this