Copyright © 2013-2014 MultiMedia Soft

GraphicItemBuddyPictureSetFromMemory method

Previous pageReturn to chapter overviewNext page



Sets a picture taken from a memory stream that will be displayed as a buddy picture of a graphic item over the waveform's graphics. The HBITMAP of the current buddy picture can be obtained through the GraphicItemBuddyPictureGet method.

Settings of the buddy picture can be obtained and modified through the GraphicItemBuddyPictureParamsGet and GraphicItemBuddyPictureParamsSet methods.


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



In this case vertical lines are set to be rendered over time rulers, allowing buddy pictures to be rendered outside of the waveform area.


An existing buddy picture can be removed at a later time by calling the GraphicItemBuddyPictureSetFromFile method with an empty pathname.


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





[Visual Basic]

control.GraphicItemBuddyPictureSetFromMemory (

nUniqueId as Long,

pBuffer as Variant,

nBufferLength as Long,

settings as Long

) as enumWanErrorCodes



short control.GraphicItemBuddyPictureSetFromMemory (

long nUniqueId,

const VARIANT FAR& pBuffer,

long nBufferLength,

void *settings









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


Input buffer containing the graphic items in XML format.

Supported graphic formats are BMP, ICO, GIF, JPG, TIF and PNG.


Length of the input buffer expressed in bytes


Address of a structure of type WANALYZER_BUDDY_PICTURE that contains the settings of the new buddy picture.

These settings can be modified or retrieved at a later time through the GraphicItemBuddyPictureParamsSet and GraphicItemBuddyPictureParamsGet methods.

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



Return value






Negative value

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

enumWanErrorCodes.ERR_WAN_NOERROR (0)

The method call was successful.