Why doesn't the shell animation control tell me the dimensions of the animation it is displaying?

Raymond Chen


As we saw some time ago, the shell animation control suffers from many limitations because its job is to be a scaled-down animation control instead of one of its more full-featured counterparts. One customer wanted to know how to load an animation into the shell animation control and then query its dimensions. Well, there is no message that reveals the dimensions of the animation. Why not? Because you should already know. You can’t use the shell animation control a general-purpose animation control because of those pesky limitations. You can only use animations that you yourself authored to conform to the control’s rather stringent requirements. And since you authored those animations yourself, you already know what their dimensions are. If you don’t know the dimensions of the animation you’re putting into the shell animation control, then how do you know that it meets all the other criteria either? In other words, to know that the animation is suitable for the shell animation control you already had to know far more about the animation than its dimensions.

Remember that the shell animation control supported only what the shell needed it to do when it was introduced in Windows 95. The shell team then figured, “Well, we wrote it, we may as well document it for others to use.” Of course, no good deed goes unpunished, because this gift has turned into a liability: Even though Explorer stopped using the shell animation control years ago, the code for the control must remain in the product because it was documented to the public, and along with the code come all the support burdens.


Comments are closed. Login to edit/delete your existing comments