FOF_ALLOWUNDO;
break;
}
if (Panel == LEFT)
{
Row = Form1-> FileListLeft-> Row;
Name = Form1-> FileListLeft-> Cells [ColName] [Row];
Path = CurrentPathLeft + Name;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
strcat (PathChar, " 0");
StructOperation.pFrom = PathChar;
SHFileOperation (& StructOperation);
Path = CurrentPathLeft + Mask;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
ViewDirectory (PathChar, Panel);
if (CurrentPathRight.AnsiCompare (CurrentPathLeft) == 0) ViewDirectory (PathChar, RIGHT);
}
else
{
Row = Form1-> FileListRight-> Row;
Name = Form1-> FileListRight-> Cells [ColName] [Row];
Path = CurrentPathRight + Name;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
strcat (PathChar, " 0");
StructOperation.pFrom = PathChar;
SHFileOperation (& StructOperation);
Path = CurrentPathRight + Mask;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
ViewDirectory (PathChar, Panel);
if (CurrentPathRight.AnsiCompare (CurrentPathLeft) == 0) ViewDirectory (PathChar, LEFT);
}
}
// --------------------------------------------- ---------------------------------
// Копіювання та переміщення
void CopyOrRemove (int Panel, int Operation)
{
const AnsiString Mask = " *. * 0";
SHFILEOPSTRUCT StructOperation;
AnsiString Name;
char PathCharFrom [256] = " 0";
char PathCharTo [256] = " 0";
long int Row; Form1-> FileListLeft-> Row;
AnsiString Path;
if (CurrentPathRight.AnsiCompare (Curre ntPathLeft) == 0)
MessageBox (0, " Кінцевий й вихідний каталоги збігаються! "," Vontrop Commander - Помилка! ", 0);
else
{
StructOperation.hNameMappings = 0;
StructOperation.lpszProgressTitle = 0;
StructOperation.hwnd = 0;
StructOperation.fAnyOperationsAborted = false;
StructOperation.fFlags = 0;
switch (Operation)
{
case FO_COPY: StructOperation.wFunc = FO_COPY;
break;
case FO_MOVE: StructOperation.wFunc = FO_MOVE;
break;
}
if (Panel == LEFT)
{
Row = Form1-> FileListLeft-> Row;
Name = Form1-> FileListLeft-> Cells [ColName] [Row];
Path = CurrentPathLeft + Name;
strcpy (PathCharFrom, Path.c_str ());// Преобрзованіе AnsiString в char
StructOperation.pFrom = PathCharFrom;
strcpy (PathCharTo, CurrentPathRight.c_str ());// Преобрзованіе AnsiString в char
StructOperation.pTo = PathCharTo;
SHFileOperation (& StructOperation);
Path = CurrentPathLeft + Mask;
st...