Animate_Open macro (commctrl.h)

Opens an AVI clip and displays its first frame in an animation control. You can use this macro or send the ACM_OPEN message explicitly.

Syntax

BOOL Animate_Open(
   HWND   hwnd,
   LPTSTR szName
);

Parameters

hwnd

Type: HWND

A handle to the animation control.

szName

Type: LPTSTR

A pointer to a buffer that contains the path of the AVI file or the name of an AVI resource. Alternatively, this parameter can consist of the AVI resource identifier in the LOWORD and zero in the HIWORD. To create this value, use the MAKEINTRESOURCE macro. The control loads an AVI resource from the module specified by the instance handle passed to the CreateWindow function, the Animate_Create macro, or the dialog box creation function that created the control. The AVI file or resource specified by szName must not contain audio.

If this parameter is NULL, the system closes the AVI file that was previously opened for the specified animation control, if any.

Return value

Type: BOOL

Returns nonzero if successful, or zero otherwise.

Remarks

You can only open silent AVI clips. ACM_OPEN and Animate_Open will fail if szName specifies an AVI clip that contains sound.

You can use Animate_Close to close an AVI file or AVI resource that was previously opened for the specified animation control.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h