wxProgressDialog

I think that (if you can't gain some kind of consistent progress metric -
like Paul's suggestion) then it might well be a UI-design mistake to use a
"progress bar" as Rytis suggested -

What I do in those situations is:

  - don't popup anything for the first two seconds (there is no need for
    a progress dialog if the whole action takes less than two seconds)

  - set the max value to be your timeout for the operation (normally
    around 30 seconds for me) and have the progress based on elapsed
    time

  - once you start getting results, base the progress on those results
    (assuming the first bit tells you how big the total is)

This will give accurate results should the operation timeout, and at
other times represents a good best guess. The same algorithm was in
a shipping product for 6 years and no customer ever said anything.

Roger