Mouse drag message or other notification?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Mouse drag message or other notification?

Post by JBensimon » 16 May 2021, 16:56

I have a script that displays multiple GUI windows, each of which is an available drop target (via separate xxGuiDropFiles: labels). The action performed with the dropped file(s) depends on the window onto which they're dropped, so I'd like to display a ToolTip as the mouse pointer enters one of the windows' client area while dragging files to indicate the action that will be performed if the files are dropped. I can't however find a window message or other indicator that a drag operation is in progress as the pointer moves into one of the windows. It's not sufficient to rely on receiving a WM_MOUSEMOVE message with the left mouse button down (MK_LBUTTON=0x1 flag set in wParam) since that doesn't necessarily indicate a drag operation is in progress.

Note that what I'm trying to do is similar to what File Explorer does when dragging files onto a window, using a tooltip to indicate whether the drop would result in a Move or a Copy operation.

Any ideas?

Thanks.
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: Mouse drag message or other notification?

Post by swagfag » 16 May 2021, 19:10

implement an IDropTarget and register it for ur window/control of choice
JBensimon
Posts: 118
Joined: 19 Nov 2017, 11:19

Re: Mouse drag message or other notification?

Post by JBensimon » 19 May 2021, 18:54

Good lead, thanks. Seems like a lot of work, but I'll give it a go.
Post Reply

Return to “Ask for Help (v1)”