Roy Lambert wrote:
Is there a way of setting where the progress dialog is shown when
using ShFileOperation to copy large files?
In a word, no.
I have a progress bar in my application and copy several files at a
time (one by one). The progress bar shows the overall progress with
the ShFileOperation progress display showing when they're large. I'd
like to position the ShFileOperation progress display just below my
progress bar.
If you use CopyFileEx() instead, you can provide it with a status
callback function so you can display status in your own progress UI:
https://msdn.microsoft.com/en-us/library/windows/desktop/aa363852.aspx
Or, on Vista+, you can use IFileOperation (like the SHFileOperation()
documentation says to), providing it with an IOperationsProgressDialog
interface via the IFileOperation.SetProgressDialog() method so you can
receive status callbacks:
https://msdn.microsoft.com/en-us/library/windows/desktop/bb775803.aspx
For instance, I would add a TLabel and second TProgressBar to your
existing UI, where the TLabel displays the current filename being
copied, and the TProgressBar displays the percent complete of that file.
--
Remy Lebeau (TeamB)
Connect with Us