ACM_OPEN Message

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

Syntax

To send this message, call the SendMessage function as follows.
 lResult = SendMessage(     // returns LRESULT in lResult
 (HWND) hWndControl,        // handle to destination control
 (UINT) ACM_OPEN,           // message ID
 #if (_WIN32_IE >= 0x0400)
     wParam = (WPARAM)(HINSTANCE)hinst,
 #else
     wParam = 0,
 #endif
     lParam = (LPARAM) (LPSTR) lpszName
 ); 

Parameters

hinst
Version 4.71 and later. An instance handle to the module from which the resource should be loaded. Set this value to NULL to have the control use the HINSTANCE value used to create the window. Note that if the window is created by a DLL, the default value for hinst is the HINSTANCE value of the DLL, not of the application that calls the DLL.
lpszName
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 low-order word and zero in the high-order word. To create this value, use the MAKEINTRESOURCE macro. The control loads the 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. In Version 4.71 and later, the resource is loaded from the module specified by hinst. An AVI resource must have the "AVI" type. If this parameter is NULL, the system closes the AVI file that was previously opened for the specified animation control, if any.

Return Value

Returns nonzero if successful, or zero otherwise.

Remarks

The AVI file or resource specified by lpszName must not contain audio.

With Windows 95, the animation control only responds to the ANSI version of the message (ACM_OPENA) with an ANSI string for lpszName. The Unicode version, ACM_OPENW, will fail.

With Microsoft Windows 2000 and Windows XP the animation control should use the Unicode version of the message.

You can only open silent AVI clips. ACM_OPEN and Animate_Open fail if lpszName 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.

Message Information

Headercommctrl.h
Minimum operating systems Windows NT 3.51, Windows 95
Tags :


Page view tracker