L_CreatePlayback

#include "l_bitmap.h"

L_INT EXT_FUNCTION L_CreatePlayback(phPlayback, pBitmap, hList)

pHPLAYBACK phPlayback;

/* address of the variable to be updated */

pBITMAPHANDLE pBitmap;

/* pointer to the handle of the target bitmap */

HBITMAPLIST hList;

/* bitmap list containing images to be played */

Creates an animation playback object and gets a handle for managing the playback.

Parameter

Description

phPlayback

Address of the HPLAYBACK variable that you can use afterward as the playback handle.

pBitmap

Pointer to the bitmap handle that references the target bitmap.

hList

A bitmap list containing images to be played. The list can be created using L_CreateBitmapList and related functions. You can also pass NULL in this parameter to let the function create an empty list.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

The target bitmap for the playback must be allocated before calling this function.

If you pass NULL in the hList parameter, you can use the L_AppendPlayback function to add bitmaps to the list during the playback. This is useful in the FILEREADCALLBACK function if you want to play an animated file as it is being loaded. If you need to reference the list after the playback, you can pass the address of an HBITMAPLIST variable when you call the L_DestroyPlayback function.

Required DLLs and Libraries

LTDIS

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Windows 95 / 98 / Me, Windows 2000 / XP, Windows CE.

See Also

Functions:

L_DestroyPlayback, L_GetPlaybackDelay,

 

L_CancelPlaybackWait, L_ProcessPlayback,

 

L_ClearPlaybackUpdateRect, L_GetPlaybackIndex,

 

L_GetPlaybackState, L_GetPlaybackUpdateRect,

 

L_SetPlaybackIndex, L_AppendPlayback,

 

L_ValidatePlaybackLines

Topics:

Raster Image Functions: Creating and Maintaining Lists of Images

 

Implementing Animation

Example

For a short example, refer to L_ProcessPlayback. For complete sample code, refer to the CHILD.C module of the DEMO example.