Jump to content



Photo

drag and drop to explorer except itself?

drag and drop

  • Please log in to reply
No replies to this topic

#1 flashlab

flashlab

    Seeker

  • Active Members
  • 29 posts

Posted 17 February 2012 - 03:30 PM

Thanks to ProgAndy's udf Drag and Drop with Explorer, 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 EndFunc


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










0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users