Microsoft DirectX 9.0 |
To create a simple animated bitmap logo, put all of the bitmap "frames" into a single image, as shown in the following illustration.
When you set the bitmap initially using IVMRMixerBitmap::SetAlphaBitmap, if the bitmap is in an HDC, set the rSrc field of the VMRALPHABITMAP structure to specify the size of the entire bitmap within the HDC. The top and left members of the structure are set to 0, and the right and bottom members are the width and height of the bitmap. If the bitmap is in a DirectDraw surface, then the size of the surface is known, so there is no need to specify rSrc in this method.
When you call IVMRMixerBitmap::UpdateAlphaBitmapParameters, use the rSrc member for both HDC and DirectDraw bitmaps, to specify the particular frame or rectangle within the image that you wish to display, and set the VMRBITMAP_SRCRECT flag in the dwFlags member.