Remarks
Sets the length of the waveform scroller's view in terms of displayed milliseconds. The current length can be obtained through the WaveformScroller.GetViewLength method.
For further details about methods of the Waveform scroller refer to the WaveformScroller object.
For a tutorial about the use of Waveform scrollers refer to the How to scroll the sound's waveform during playback tutorial.
Syntax
[Visual Basic]
Public Function SetViewLength (
hWndWaveformScroller as IntPtr,
nLengthInMs as Int32
) as enumWanErrorCodes
|
|
[C#]
public enumWanErrorCodes SetViewLength (
IntPtr hWndWaveformScroller,
Int32 nLengthInMs
);
|
|
[C++]
public: enumWanErrorCodes SetViewLength (
IntPtr hWndWaveformScroller,
Int32 nLengthInMs
);
|
|
Parameter
|
Description
|
|
|
hWndWaveformScroller
|
Handle of the control returned by a previous call to the WaveformScroller.Create method
|
nLengthInMs
|
Length of the view in milliseconds; by default this value is set to 10000, meaning that the waveform scroller will display 10 seconds of sound.
This value must be big enough to guarantee that one pixel on the view is provided for each millisecond of sound: if the provided value should be smaller, the component would automatically adapt it and the updated length in milliseconds could be verified through the WaveformScroller.GetViewLength method.
|
Return value
Value
|
Meaning
|
|
|
Negative value
|
An error occurred (see the LastError property for further error details)
|
enumWanErrorCodes.ERR_WAN_NOERROR (0)
|
The method call was successful.
|
|