应该可以,据说还可以有动画显示,不过俺没试过:PPPPP

解决方案 »

  1.   

    SHFILEOPSTRUCT m_shFileOp;
    m_shFileOp.hwnd = hWnd;
    m_shFileOp.fFlags = FOF_FILESONLY | FOF_NOCONFIRMMKDIR | FOF_MULTIDESTFILES ;
    m_shFileOp.fAnyOperationsAborted = FALSE; 
    m_shFileOp.hNameMappings = NULL; 
    m_shFileOp.lpszProgressTitle = NULL; //
    char m_buffFrom[20480];
    char m_buffTo[20480];
    LONG m_buffLenFrom = 0;
    LONG m_buffLenTo = 0;void CFileOp::AddFromFile(CString file)
    {
      LONG len = file.GetLength();
      memcpy((void*)&m_buffFrom[m_buffLenFrom], (void*)LPCTSTR(file), len+1);
      m_buffLenFrom += len+1;
      m_buffFrom[m_buffLenFrom] = 0;
      m_shFileOp.pFrom = &m_buffFrom[0];
    }void CFileOp::AddToFile(CString file)
    {
      LONG len = file.GetLength();
      memcpy((void*)&m_buffTo[m_buffLenTo], (void*)LPCTSTR(file), len+1);
      m_buffLenTo += len+1;
      m_buffTo[m_buffLenTo] = 0;
      m_shFileOp.pTo = &m_buffTo[0];
    }AddFromFile( "c:\\tmp\\t1.txt");
    AddFromFile( "c:\\tmp\\t2.txt");
    AddToFile( "d:\\tmp\\t1.txt");
    AddToFile( "d:\\tmp\\t2.txt");// Copy
    m_shFileOp.wFunc = FO_COPY;
    ::SHFileOperation(&m_shFileOp);// Move
    m_shFileOp.wFunc = FO_MOVE;
    ::SHFileOperation(&m_shFileOp);// Delete
    m_shFileOp.wFunc = FO_DELETE;
    ::SHFileOperation(&m_shFileOp);// Rename
    m_shFileOp.wFunc = FO_RENAME;
    ::SHFileOperation(&m_shFileOp);