ScenesGetCount Method (MComposerClass)
number of scenes
Gets the count of scenes.
Syntax
Public Overridable Sub ScenesGetCount( _
   ByRef _pnCount As Integer _
) 
public virtual void ScenesGetCount( 
   out int _pnCount
)
public procedure ScenesGetCount( 
   Out  _pnCount: Integer
); virtual; 
public: virtual void ScenesGetCount( 
   [PARAMFLAG::Out] int _pnCount
) 

Parameters

_pnCount
number of scenes
Example

Here is example of how to remove all scenes form mixer configuration:

Dim myMixer As New MMixerClass()
myMixer.ObjectStart(Nothing)
Dim nCount As Integer
myMixer.ScenesGetCount(nCount)
For i As Integer = 0 To nCount - 1
Dim mySceneID As String
Dim myScene As IMElements
myMixer.ScenesGetByIndex(i, mySceneID, myScene)
myMixer.ScenesRemove(mySceneID)
Next
MMixerClass myMixer= new MMixerClass();
myMixer.ObjectStart(null);
int nCount;
myMixer.ScenesGetCount(out nCount);
for (int i=0; i<nCount; i++)
{
string mySceneID;
IMElements myScene;
myMixer.ScenesGetByIndex(i, out mySceneID, out myScene);
myMixer.ScenesRemove(mySceneID);
}
var
myMixer: MMixer;
myObject: IMObject;
myScenes: IMScenes;
mySceneID: widestring;
myScene: IMElements;
i, nCount: integer;
begin
//initialize a mixer
myMixer:= CreateComObject(CLASS_MMixer) as MMixer;
myObject:= myMixer as IMobject;
myObject.ObjectStart(nil);
myScenes := myMixer as IMScenes;
myScenes.ScenesGetCount(nCount);
for i:=0 to nCount-1 do
begin
myScenes.ScenesGetByIndex(i, mySceneID, myScene);
myScenes.ScenesRemove(mySceneID);
end;
end;
See Also

Reference

MComposerClass Class
MComposerClass Members