Before you begin the reading, initialise the range of your progressbar by sending a
PBM_SETRANGE [
^]message. This will allow you to set the scale for your bar.
Then in your read-thread, send a
PBM_SETPOS[
^] message every time you want an update. For example if you set your range to the number of megabytes of data read, send this message every time you've read that amount.
If somehow your read-thread doesn't allow for this (e.g. you read all your data with one statement instead of in smaller chunks) you could
set a timer[
^] and send a PBM_SETPOS every minute. This isn't a very accurate way to do it though.