Using Animation Controls to play a avi file in a dialog

Gurus,

i need to play an avi file in a dialog (not using MFC).
i have to use the API's Animate_Create, Animate_Open
and Animate_Play.

i have tried the article "creating an animation control" in msdn

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/commctls/animation/animationoverview.asp

but could not get it worked.

if any of u can provide me links on how to do this , it would be helpful.
[485 byte] By [shishya] at [2007-11-19 22:46:19]
# 1 Re: Using Animation Controls to play a avi file in a dialog
Care to explain further what did not work? It would help us in helping you.
Mike Harnad at 2007-11-9 13:22:33 >
# 2 Re: Using Animation Controls to play a avi file in a dialog
Did you pay attention to the following information at the MSDN

An animation control can display an AVI clip originating from either an uncompressed AVI file or from an AVI file that was compressed using run-length (BI_RLE8) encoding.
Boris K K at 2007-11-9 13:23:31 >
# 3 Re: Using Animation Controls to play a avi file in a dialog
This is what i tried.

InitCommonControls();
HWND hwndAnim = Animate_Create(m_hWnd ,IDC_ANIMATE,WS_BORDER | WS_CHILD, NULL);
Animate_Open(hwndAnim,"1.avi");
Animate_Play(hwndAnim,0,-1,3);

Thanks
shishya at 2007-11-9 13:24:30 >
# 4 Re: Using Animation Controls to play a avi file in a dialog
Did you check which function/or macro return an indication of a failure? For example, does Animate_Open return TRUE or FALSE?
Boris K K at 2007-11-9 13:25:33 >
# 5 Re: Using Animation Controls to play a avi file in a dialog
none of the functions failed. but the animation never showed up.

can u provide me with some sample code which i can look into.
shishya at 2007-11-9 13:26:33 >
# 6 Re: Using Animation Controls to play a avi file in a dialog
You probably missed to make the animation control visible.

Try this:

HWND hwndAnim = Animate_Create(. . ., WS_BORDER | WS_CHILD | WS_VISIBLE, . . .);
Hope it helps.
Viorel at 2007-11-9 13:27:32 >