Copyright © 2008-2013 MultiMedia Soft

GraphicItemBuddyPictureGet method

Previous pageReturn to chapter overviewNext page



Obtains the HBITMAP of the eventually existing buddy picture for the given graphic item.


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:



An existing buddy picture can be removed at a later time by calling this method again with the HBITMAP parameter set to IntPtr.Zero.


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]

Public Function GraphicItemBuddyPictureGet (

nUniqueId as Int32,

ByRef hBitmap as IntPtr

) as enumWanErrorCodes



public enumWanErrorCodes GraphicItemBuddyPictureGet (

Int32 nUniqueId,

ref IntPtr hBitmap




public: enumWanErrorCodes GraphicItemBuddyPictureGet (

Int32 nUniqueId,

IntPtr __gc *hBitmap









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


Reference that, on return from the method call, will contain the HBITMAP of the picture.

In order to avoid leaks of system resource, when the HBITMAP is no more needed the container application should free it by calling the DeleteObject function of the Windows API.



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.