The distance to initiate drag ‘n drop is controlled through this api..
Increasing their values helps to avoid accidental Copy of files into the same directory
#include <Windows.h> #include <stdio.h> int main() { // DEFAULT VALUES ARE 4 and 4 int cx,cy; cx = GetSystemMetrics( SM_CXDRAG ) ; cy = GetSystemMetrics( SM_CYDRAG ) ; printf( "cx=%d, cy=%d\n", cx, cy ) ; SystemParametersInfoA( SPI_SETDRAGHEIGHT, 90, 0, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE ) ; SystemParametersInfoA( SPI_SETDRAGWIDTH, 90, 0, SPIF_SENDCHANGE | SPIF_UPDATEINIFILE ) ; cx = GetSystemMetrics( SM_CXDRAG ) ; cy = GetSystemMetrics( SM_CYDRAG ) ; printf( "cx=%d, cy=%d\n", cx, cy ) ; }