Skip to content
Trey Miller edited this page Feb 1, 2019 · 2 revisions

DragDropConfirm

If you have ever worked in a Windows environment where many users shared files on a server, you have probably seen it happen where a folder or file is suddenly gone, only to be discovered in some other folder (often a sibling folder). This is usually due to an accident that is very easy to do: press slightly too hard on the mouse button while moving the cursor over the windows explorer window, causing an accidental drag and drop move event with no confirmation.

So... this is a simple shell extension for Windows to create that confirmation. It is essentially a "fork" of Microsoft's CppShellExtDragDropHandler example.

hold_up_dialog

You can see the trick behind how this works from the second screenshot. This is the actual menu taking place behind the scenes when you left-click drag and drop. To see this menu in Windows Explorer, just use right-click when dragging instead. When you click OK, the menu will be unmodified from the original Windows Explorer list, with Move here as default. If you click Cancel, it will show the modified menu with Don't move added and set as default.

dont_move_item

Clone this wiki locally