HexEdit/Explorer.cpp
DROPEFFECT CExplorerDropTarget::DragCheck (COleDataObject* pDataObject,
						DWORD dwKeyState, CPoint point )
{
	DROPEFFECT retval = DROPEFFECT_MOVE;

	// Get the destination folder of the move and the folders/files to move
	CString dst = GetDst(point);
	if (dst.IsEmpty())
		return DROPEFFECT_NONE;       // Current drag folder is not a drop target
	std::vector<CString> src;
	GetNames(pDataObject, src);

	for (std::vector<CString>::const_iterator psrc = src.begin(); psrc != src.end(); ++psrc)
	{
		DROPEFFECT de;
		if (::PathIsDirectory(*psrc))
			de = CanMoveFolder(*psrc, dst);
		else
			de = CanMove(*psrc, dst);

		if (de == DROPEFFECT_NONE)
		{
			retval = DROPEFFECT_NONE;      // if we can't drag any then return NONE
			break;
		}
		else if (de == DROPEFFECT_COPY)
			retval = DROPEFFECT_COPY;     // if we can't move any then return COPY
	}
	if (retval == DROPEFFECT_MOVE && (dwKeyState & MK_CONTROL) != 0)
		retval = DROPEFFECT_COPY;
	if (retval == DROPEFFECT_COPY && (dwKeyState & MK_SHIFT) != 0)
		retval = DROPEFFECT_MOVE;
	return retval;
}
// Get destination folder + list of files/folders to move/copy. If any of them cannot
// be done (eg drag file onto itself or drag folder into descendant) then DROPEFFECT_NONE
// is returned.  If any cannot be moved without copying and deleting (ie source and
// dest are on different drives) then DROPEFFECT_COPY is returned, else DROPEFFECT_MOVE.
// However, if user holds Ctrl key down DROPEFFECT_COPY is forced (even on same drive), OR
// if they hold Shift key down then DROPEFFECT_MOVE is forced (even across drives).

Get destination folder + list of files/folders to move/copy. If any of them cannot
be done  then DROPEFFECT_NONE
is returned.  If any cannot be moved without copying and deleting  then DROPEFFECT_COPY is returned, else DROPEFFECT_MOVE.
However, if user holds Ctrl key down DROPEFFECT_COPY is forced (even on same drive), OR
if they hold Shift key down then DROPEFFECT_MOVE is forced (even across drives).
Get destination folder + list of files / folders to move / copy . If any of them cannot be done then DROPEFFECT_NONE is returned . If any cannot be moved without copying and deleting then DROPEFFECT_COPY is returned else DROPEFFECT_MOVE . However if user holds Ctrl key down DROPEFFECT_COPY is forced ( even on same drive ) OR if they hold Shift key down then DROPEFFECT_MOVE is forced ( even across drives ) .
DROPEFFECT CExplorerDropTarget::DragCheck (COleDataObject* pDataObject,
						DWORD dwKeyState, CPoint point )
{
	DROPEFFECT retval = DROPEFFECT_MOVE;
	CString dst = GetDst(point);
	if (dst.IsEmpty())
		return DROPEFFECT_NONE;       
	std::vector<CString> src;
	GetNames(pDataObject, src);
	for (std::vector<CString>::const_iterator psrc = src.begin(); psrc != src.end(); ++psrc)
	{
		DROPEFFECT de;
		if (::PathIsDirectory(*psrc))
			de = CanMoveFolder(*psrc, dst);
		else
			de = CanMove(*psrc, dst);
		if (de == DROPEFFECT_NONE)
		{
			retval = DROPEFFECT_NONE;      
			break;
		}
		else if (de == DROPEFFECT_COPY)
			retval = DROPEFFECT_COPY;     
	}
	if (retval == DROPEFFECT_MOVE && (dwKeyState & MK_CONTROL) != 0)
		retval = DROPEFFECT_COPY;
	if (retval == DROPEFFECT_COPY && (dwKeyState & MK_SHIFT) != 0)
		retval = DROPEFFECT_MOVE;
	return retval;
}
DROPEFFECT CExplorerDropTarget :: DragCheck ( COleDataObject * pDataObject , DWORD dwKeyState , CPoint point ) { DROPEFFECT retval = DROPEFFECT_MOVE ; CString dst = GetDst ( point ) ; if ( dst . IsEmpty ( ) ) return DROPEFFECT_NONE ; std :: vector < CString > src ; GetNames ( pDataObject , src ) ; for ( std :: vector < CString > :: const_iterator psrc = src . begin ( ) ; psrc != src . end ( ) ; ++ psrc ) { DROPEFFECT de ; if ( :: PathIsDirectory ( * psrc ) ) de = CanMoveFolder ( * psrc , dst ) ; else de = CanMove ( * psrc , dst ) ; if ( de == DROPEFFECT_NONE ) { retval = DROPEFFECT_NONE ; break ; } else if ( de == DROPEFFECT_COPY ) retval = DROPEFFECT_COPY ; } if ( retval == DROPEFFECT_MOVE && ( dwKeyState & MK_CONTROL ) != 0 ) retval = DROPEFFECT_COPY ; if ( retval == DROPEFFECT_COPY && ( dwKeyState & MK_SHIFT ) != 0 ) retval = DROPEFFECT_MOVE ; return retval ; }
Get destination folder + list of files/folders to move/copy.
Get destination folder + list of files / folders to move / copy .
// Get the destination folder of the move and the folders/files to move
 // Current drag folder is not a drop target
 // if we can't drag any then return NONE
 // if we can't move any then return COPY
