HexEdit/Explorer.cpp
DROPEFFECT CExplorerDropTarget::CanMove(LPCTSTR file, LPCTSTR dst)
{
	TCHAR folder[MAX_PATH];
	_tcsncpy(folder, file, MAX_PATH);
	LPTSTR pfn = ::PathFindFileName(folder);
	pfn--;
	ASSERT(pfn > folder && pfn < folder + MAX_PATH);        // Make sure it points into the buffer
	ASSERT(*pfn == '\\');
	*pfn = '\0';                                            // Truncate at file name to get folder
	ASSERT(::PathIsDirectory(folder) && ::PathIsDirectory(dst));
	if (::StrCmpI(folder, dst) == 0)
		return DROPEFFECT_NONE;
	else if (::PathIsSameRoot(folder, dst))
		return DROPEFFECT_MOVE;
	else
		return DROPEFFECT_COPY;
}
// Check if move is allowed - if moving to same folder (ie no move at all) return DROPEFFECT_NONE,
// else return DROPEFFECT_MOVE or DROPEFFECT_COPY depending on whether moving across drives.

Check if move is allowed - if moving to same folder  return DROPEFFECT_NONE,
else return DROPEFFECT_MOVE or DROPEFFECT_COPY depending on whether moving across drives.
Check if move is allowed - if moving to same folder return DROPEFFECT_NONE else return DROPEFFECT_MOVE or DROPEFFECT_COPY depending on whether moving across drives .
DROPEFFECT CExplorerDropTarget::CanMove(LPCTSTR file, LPCTSTR dst)
{
	TCHAR folder[MAX_PATH];
	_tcsncpy(folder, file, MAX_PATH);
	LPTSTR pfn = ::PathFindFileName(folder);
	pfn--;
	ASSERT(pfn > folder && pfn < folder + MAX_PATH);        
	ASSERT(*pfn == '\\');
	*pfn = '\0';                                            
	ASSERT(::PathIsDirectory(folder) && ::PathIsDirectory(dst));
	if (::StrCmpI(folder, dst) == 0)
		return DROPEFFECT_NONE;
	else if (::PathIsSameRoot(folder, dst))
		return DROPEFFECT_MOVE;
	else
		return DROPEFFECT_COPY;
}
DROPEFFECT CExplorerDropTarget :: CanMove ( LPCTSTR file , LPCTSTR dst ) { TCHAR folder [ MAX_PATH ] ; _tcsncpy ( folder , file , MAX_PATH ) ; LPTSTR pfn = :: PathFindFileName ( folder ) ; pfn -- ; ASSERT ( pfn > folder && pfn < folder + MAX_PATH ) ; ASSERT ( * pfn == ' \\ ' ) ; * pfn = ' \0 ' ; ASSERT ( :: PathIsDirectory ( folder ) && :: PathIsDirectory ( dst ) ) ; if ( :: StrCmpI ( folder , dst ) == 0 ) return DROPEFFECT_NONE ; else if ( :: PathIsSameRoot ( folder , dst ) ) return DROPEFFECT_MOVE ; else return DROPEFFECT_COPY ; }
Check if move is allowed - if moving to same folder (ie no move at all) return DROPEFFECT_NONE,
else return DROPEFFECT_MOVE or DROPEFFECT_COPY depending on whether moving across drives.
Check if move is allowed - if moving to same folder ( ie no move at all ) return DROPEFFECT_NONE else return DROPEFFECT_MOVE or DROPEFFECT_COPY depending on whether moving across drives .
// Make sure it points into the buffer
 // Truncate at file name to get folder
