Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
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.
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.