Copyright © 2006-2019 MultiMedia Soft

WaveformAnalyzer.GraphicItemBuddyTextSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets a buddy text of a graphic item over the waveform's graphics. The current buddy text can be obtained through the WaveformAnalyzer.GraphicItemBuddyTextGet method.

Settings of the buddy text can be obtained and modified through the WaveformAnalyzer.GraphicItemBuddyTextParamsGet and WaveformAnalyzer.GraphicItemBuddyTextParamsSet methods.

 

On the screenshot below you can see a set of vertical lines displayed over the waveform, each with its buddy text aligned on the top right of the vertical line:

 

 

An existing buddy text can be removed at a later time by calling this method again and by specifying an empty text string.

 

For details about graphic items management on the waveform analyzer refer to the How to add graphic items to the Waveform analyzer section.

For details about the use of the Waveform Analyzer refer to the How to use the Waveform Analyzer section.

For further details about methods of the Waveform Analyzer refer to the WaveformAnalyzer object section.

 

 

Syntax

 

[Visual Basic]

control.WaveformAnalzyer.GraphicItemBuddyTextSet (

nUniqueId as Long,

strText as String,

settings as Long,

hFontText as OLE_HANDLE

) as enumErrorCodes


 

[C++]

short control.WaveformAnalzyer.GraphicItemBuddyTextSet (

long nUniqueId,

LPCTSTR strText,

void *settings,

OLE_HANDLE hFontText

);


 

 

Parameter

Description

 

 

nUniqueId

Unique identification number assigned to the graphic item.

The unique identification number of a graphic item is generated using one of the following methods:

strText

String of the buddy text.

An empty string will remove an eventually existing buddy text.

settings

Address of a structure of type WANALYZER_BUDDY_TEXT that contains the settings of the new buddy text.

These settings can be modified or retrieved at a later time through the WaveformAnalyzer.GraphicItemBuddyTextParamsSet and WaveformAnalyzer.GraphicItemBuddyTextParamsGet methods.

By setting this value to 0 the buddy text will be rendered with default setting.

hFontText

The handle (HFONT) of the font used for rendering the text.

The component will make a copy of this font so, when the method's call returns to the caller, you can remove this font from system resources by calling the DeleteObject function of the Windows API.

By setting this value to 0 the buddy text will be rendered with the default font.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.