SetSoundFromMemory method |
|
Remarks Changes at run-time one of the sounds associated to the various button states loading a WAV sound previously stored in memory.
Syntax Visual Basic control.SetSoundFromMemory (index as enumSounds, pDataInMemory as string, datasize as long) as integer
Visual C++ 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
VARIANT va; VariantInit (&va); 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.
Return value
|