Jump to content

drag and drop to explorer except itself?


Recommended Posts

Thanks to ProgAndy's udf it's really amazing. But here is the problem. When I drag an item from a listview and release the left mouse button within the listview control(or within the app's main window), a message says 'Copy'.

Now I would like the progress cancel the dragdrop action if the drop location is the app itself,or just shield the COPY message since it's obviously wrong.

I've tried to add a function ,which make sure the window under the cursor is not the app itself, before the message shows.

Func _WindowGetHovered()
Local $h_Struct = DllStructCreate($tagPoint)
DllStructSetData($h_Struct, "x", MouseGetPos(0))
DllStructSetData($h_Struct, "y", MouseGetPos(1))
    Local $h_wnd = _WinAPI_WindowFromPoint($h_Struct)
Local $res=_WinAPI_GetParent($h_wnd)
    Return $res

But it doesn't work fine :) I even don't know why I can't get the right handle of currect cursor location. Anyone can help me

Link to comment
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

  • Create New...