Copyright © 2006-2018 MultiMedia Soft

GraphicBarsManager object

Previous pageReturn to chapter overviewNext page

The GraphicBarsManager object, accessible through the control's GraphicBarsManager property, is internally implemented as a COM interface called IGraphicBarsManager and contains information needed to render custom graphic bars like VU-Meters bars, Spectrum bars and Progress bars.

 

It can be used at Run-time in order to create various graphic bars and to change their graphical settings. For details about using graphic bars refer to the How to perform custom feedbacks rendering using graphic bars section.

 

The GraphicBarsManager object is implemented through the following methods:

 

Methods

 

Create

Destroy

GetGraphicalSettings

GetGraphicalSettingsParam

GetRange

GetValue

Move

Refresh

SetFlatBorder

SetGraphicalSettings

SetGraphicalSettingsParam

SetRange

SetValue

Show

 

The following code snippets show how to create and change this object in your code. These examples assume that you have placed a control named MyRecorder on a form or dialog box and that you want to change the graphic bar's range from 0 to 100.

 

Microsoft Visual C++ (4.0, 5.0 and 6.0)

Microsoft Visual Basic (5.0 and 6.0)

 

 

Microsoft Visual C++ (4.0, 5.0 and 6.0)

 

Properties and methods of the control are accessible through the control wrapper class CActiveSoundRecorder contained inside the ActiveSoundRecorder.cpp and ActiveSoundRecorder.h files: these wrapper files are automatically generated when you insert the control inside your project so, in order to access the wrapper functions, you will have to insert the following line of code somewhere in your code.

 

#include "ActiveSoundRecorder.h"

 

The GraphicBarsManager object is defined by the control wrapper class CGraphicBarsManager contained inside the GraphicBarsManager.cpp and GraphicBarsManager.h files: also these wrapper files are automatically generated when you insert the control inside your project so, in order to access this object, you will have to insert the following line of code somewhere in your code.

 

#include "GraphicBarsManager.h"

 

Here follows the code needed to perform the requested operation of initialising the Spectrum object and changing some of its properties.

// declare a GraphicBarsManager object

CGraphicBarsManager graphicBarsMan;

 

// init the object with the control's GraphicBarsManager reference

graphicBarsMan = MyRecorder.GetGraphicBarsManager ();

 

// create a new graphic bar control as a child control of the container dialog box

HWND   hWndBar = (HWND) graphicBarsMan.Create ((OLE_HANDLE) GetSafeHwnd (), 10, 10, 50, 100);

 

// change the new graphic bar's range from 0 to 100

graphicBarsMan.SetRange (hWndBar, 0, 100);

 

 

Microsoft Visual Basic (5.0 and 6.0)

 

Here follows the code needed to perform the requested operations

' create a new graphic bar control as a child control of the container form

Dim hWndBar As OLE_HANDLE

hWndBar = MyRecorder.GraphicBarsManager.Create(Me.hWnd, 10, 10, 50, 100)

 

' change the new graphic bar's range from 0 to 100

MyRecorder.GraphicBarsManager.SetRange (hWndBar, 0, 100);

 

Samples of use of the GraphicBarsManager object in Visual Basic 6 and Visual C++ 6 can be found inside the following samples installed with the product's setup package:

- Feedbacks

- RecordedSoundEditor

- SimpleMp3Recorder