Yes, that is the kind of API I was looking for. The problem now is that the animation is displayed always, even if the user has disabled this option for all windows.
The taskbar dimensions can be found quite simple with "FindWindowEx" and "GetWindowRect".