Changes at run-time one of the sounds associated to the various button states loading a WAV sound previously stored in memory.
control.SetSoundFromMemory (index as enumSounds, pDataInMemory as string, datasize as long) as integer
BOOL control.SetSoundFromMemory (long index, VARIANT pDataInMemory, long datasize);
Visual Basic example
Dim bitssound As String
Dim length As Integer
bitssound = LoadResData(xxx, "WAVE")
length = LenB(bitssound)
BtnEnh1.SetSoundFromMemory 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
va.vt = VT_BYREF | VT_UI1;
va.pbVal = (BYTE *) pointer_to_sound_in_memory;
BtnEnh1.SetSoundFromMemory (SOUND_DOWN, va, size_of_data);
With this code the SoundDown property will be changed using a sound previously loaded in memory.