AnsiString FilePath;
FilePath = CurrentPathRight + Name;
strcpy (PathChar, FilePath.c_str ());
ShellExecute (0, "open", PathChar, "", "", 1);
}
}
}
return CurrentPathRight;
}
}
// --------------------------------------------- ---------------------------------
// Створення каталогу
bool CreateFolder (int Panel)
{
const AnsiString Mask = " *. * 0";
AnsiString Path;
bool Result;
char PathChar [256] = " 0";
if (Panel == LEFT)// Якщо активна ліва панель
{
Path = CurrentPathLeft + FormDialogCreateDir-> edNewDirName-> Text;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
Result = CreateDirectory (PathChar, 0);
if (Result == false)
{
MessageBox (0, "Каталог не створений! n Можливо неправильне ім'я - n повторіть ввід. ",
"Vontrop Commander - Помилка! ", 0);
}
else
{
Path = CurrentPathLeft + Mask;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
ViewDirectory (PathChar, Panel);
if (CurrentPathLeft.AnsiCompare (CurrentPathRight) == 0) ViewDirectory (PathChar, RIGHT);
}
}
else// Якщо активна права панель
{
Path = CurrentPathRight + FormDialogCreateDir-> edNewDirName-> Text;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
Result = CreateDirectory (PathChar, 0);
if (Result == false)
{
MessageBox (0, "Каталог не створений! n Можливо неправильне ім'я - n повторіть ввід. ",
"Vontrop Commander - Помилка! ", 0);
}
else
{
Path = CurrentPathRight + Mask;
strcpy (PathChar, Path.c_str ());// Преобрзованіе AnsiString в char
ViewDirectory (PathChar, Panel);
if (CurrentPathRight.AnsiCompare (CurrentPathLeft) == 0) ViewDirectory (PathChar, LEFT);
}
}
return Result;
}
// --------------------------------------------- ---------------------------------
// Видалення
void Deleting (int Panel, int Operation)
{
const AnsiString Mask = " *. * 0";
SHFILEOPSTRUCT StructOperation;
AnsiString Name;
char PathChar [256] = " 0";
long int Row; Form1-> FileListLeft-> Row;
AnsiString Path;
StructOperation.hNameMappings = 0;
StructOperation.lpszProgressTitle = 0;
StructOperation.hwnd = 0;
StructOperation.fAnyOperationsAborted = false;
StructOperation.pTo = " 0";
switch (Operation)
{
case FO_DELETE: StructOperation.wFunc = FO_DELETE;
StructOperation.fFlags = 0;
break;
case FO_DELETER: StructOperation.wFunc = FO_DELETE;
StructOperation.fFlags =...