|Microsoft DirectX 9.0|
The timeline exposes the IAMTimeline interface. This interface contains methods for setting properties on the timeline; for adding groups to the timeline; and for creating timeline objects, such as groups, tracks, and sources. To create a new timeline, call the standard CoCreateInstance function as follows:
IAMTimeline *pTL = NULL; hr = CoCreateInstance(CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER, IID_IAMTimeline, (void**)&pTL);
The new timeline is empty. At this point you can either load an existing project file (see Loading and Previewing a Project), or build up the timeline by creating and inserting new objects (see Constructing a Timeline).