abmSetSoundFromMemory function
|
Remarks
|
Available only with Professional Version.
Changes one of the sounds associated to the various button states loading a WAV sound previously stored in memory.
|
|
Return value
|
|
Value
|
Meaning
|
|
|
|
|
FALSE
|
The operation failed
|
|
TRUE
|
The operation was successful
|
|
|
Syntax
|
long abmSetSoundFromMemory (
HWND hWndBtn,
short index,
LPCTSTR pData,
long sizeData
);
|
Parameters
|
Description
|
|
hWndBtn
|
Windows handle associated to the button.
|
|
index
|
Numerical value that represents the index of the sound property to change. Supported values are the following:
|
Value
|
Meaning
|
|
SOUND_DOWN (0)
|
|
|
SOUND_UP (1)
|
|
|
SOUND_MOUSEOVER (2)
|
|
|
SOUND_MOUSEOUT (3)
|
|
|
|
pData
|
Pointer to sound data previously loaded in memory.
|
|
sizeData
|
Numerical value that represents the data size in bytes.
|
|
Visual Basic example
Dim bitssound As String
Dim length As Integer
bitssound = LoadResData(xxx, "WAVE")
length = LenB(bitssound)
abmSetSoundFromMemory btn1.hWnd, SOUND_DOWN, bitssound, length
With this code the
SoundDown property will be changed using a sound identified by xxx (contained in a .RES file).
Visual C++ example
BYTE *pointer_to_sound_in_memory;
pointer_to_sound_in_memory = new BYTE[65536];
..
store the sound into the pointer_to_sound_in_memory location
..
abmSetSoundFromMemory (btn1.GetSafeHwnd (), SOUND_DOWN, (LPCTSTR) pointer_to_sound_in_memory, size_of_data);
delete pointer_to_bitmap_in_memory;
With this code the
SoundDown property will be changed using a sound previously loaded in memory.