Copyright © 2013-2017 MultiMedia Soft

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 GraphicItemBuddyTextGet method.

Settings of the buddy text can be obtained and modified through the GraphicItemBuddyTextParamsGet and 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.

 

 

Syntax

 

[Visual Basic]

control.GraphicItemBuddyTextSet (

nUniqueId as Long,

strText as String,

settings as Long,

hFontText as OLE_HANDLE

) as enumWanErrorCodes


 

[C++]

short control.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:

GraphicItemHorizontalLineAdd for horizontal lines
GraphicItemVerticalLineAdd for vertical lines
GraphicItemWaveRangeAdd for wave ranges

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 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)

enumWanErrorCodes.ERR_WAN_NOERROR (0)

The method call was successful.