This control can be used to play the animation object, and you should specify the animation object when you create the control by using the dwAddData:
HWND hwnd; ANIMATION* anim = CreateAnimationFromGIF89aFile (HDC_SCREEN, "banner.gif"); if (anim == NULL) goto error; hwnd = CreateWindow (CTRL_ANIMATION, "", WS_VISIBLE | ANS_AUTOLOOP, 100, 10, 10, 300, 200, hWnd, (DWORD)anim); SendMessage (hwnd, ANM_STARTPLAY, 0, 0);
#define ANS_AUTOLOOP 0x0001L |
Loop playing the animation automatically.
Definition at line 206 of file animation.h.
#define ANS_FITTOANI 0x0004L |
Resize the control to fit the animation.
Definition at line 218 of file animation.h.
#define ANS_SCALED 0x0002L |
Scale the animation to the control size.
Definition at line 212 of file animation.h.