Since you're using the progress bar introduced with the Vista version of the common controls library, you can do even better than simply suppressing the animation.
The progress bar has three states:
- Normal
- Paused
- Error
You switch between the states by sending the progress bar control window a PBM_SETSTATE
message. The wParam
parameter should be either PBST_NORMAL
, PBST_PAUSED
, or PBST_ERROR
. The lParam
parameter should be 0.
The pulsing animation is suppressed for both the paused and error states.
To retrieve the current state of the progress bar, send a PBM_GETSTATE
message.