The IDirectMusicComposer::ComposeTemplateFromShape method creates a new template segment based on a predefined shape.
HRESULT ComposeTemplateFromShape(
WORD wNumMeasures,
WORD wShape,
BOOL fIntro,
BOOL fEnd,
WORD wEndLength,
IDirectMusicSegment** ppTempSeg
);
If the method succeeds, the return value is S_OK.
If it fails, the method may return one of the following error values:
E_INVALIDARG |
E_OUTOFMEMORY |
E_POINTER |
The value of wEndLength should not be greater than the length of the longest ending available in any style likely to be associated with this template through the IDirectMusicComposer::ComposeSegmentFromTemplate method. The ending will start playing at wEndLength measures before the end of the segment, and if the ending is less than wEndLength measures long, the music will then revert to the regular groove.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in dmusici.h.
IDirectMusicComposer::ComposeSegmentFromShape, IDirectMusicComposer::ComposeSegmentFromTemplate, Using Templates