我的意思是用两个image控件,image1和image2, image1在上面,控制它只能在 image2的范围内比如固定image1 and image2的top值为100,image2的width=100,使image1的left=image2.left,让image1的左右移动只能在image2的width内。然后跟据image2的left的值来改变声道和音量大小!不知道说没有说清楚。反正就是跟据他的值的改变来更改音量及声道
BOOL sndPlaySound( LPCSTR lpszSound, UINT fuSound ); ParameterslpszSoundA string that specifies the sound to play. This parameter can be either an entry in the registry or in WIN.INI that identifies a system sound, or it can be the name of a waveform-audio file. (If the function does not find the entry, the parameter is treated as a filename.) If this parameter is NULL, any currently playing sound is stopped.fuSoundFlags for playing the sound. The following values are defined:SND_ASYNCThe sound is played asynchronously and the function returns immediately after beginning the sound. To terminate an asynchronously played sound, call sndPlaySound with lpszSoundName set to NULL.SND_LOOPThe sound plays repeatedly until sndPlaySound is called again with the lpszSoundName parameter set to NULL. You must also specify the SND_ASYNC flag to loop sounds.SND_MEMORYThe parameter specified by lpszSoundName points to an image of a waveform sound in memory.SND_NODEFAULTIf the sound cannot be found, the function returns silently without playing the default sound.SND_NOSTOPIf a sound is currently playing, the function immediately returns FALSE, without playing the requested sound.SND_SYNCThe sound is played synchronously and the function does not return until the sound ends. Return ValuesReturns TRUE if successful or FALSE otherwise.
关注!
image2的范围内比如固定image1 and image2的top值为100,image2的width=100,使image1的left=image2.left,让image1的左右移动只能在image2的width内。然后跟据image2的left的值来改变声道和音量大小!不知道说没有说清楚。反正就是跟据他的值的改变来更改音量及声道
UINT fuSound
);
ParameterslpszSoundA string that specifies the sound to play. This parameter can be either an entry in the registry or in WIN.INI that identifies a system sound, or it can be the name of a waveform-audio file. (If the function does not find the entry, the parameter is treated as a filename.) If this parameter is NULL, any currently playing sound is stopped.fuSoundFlags for playing the sound. The following values are defined:SND_ASYNCThe sound is played asynchronously and the function returns immediately after beginning the sound. To terminate an asynchronously played sound, call sndPlaySound with lpszSoundName set to NULL.SND_LOOPThe sound plays repeatedly until sndPlaySound is called again with the lpszSoundName parameter set to NULL. You must also specify the SND_ASYNC flag to loop sounds.SND_MEMORYThe parameter specified by lpszSoundName points to an image of a waveform sound in memory.SND_NODEFAULTIf the sound cannot be found, the function returns silently without playing the default sound.SND_NOSTOPIf a sound is currently playing, the function immediately returns FALSE, without playing the requested sound.SND_SYNCThe sound is played synchronously and the function does not return until the sound ends. Return ValuesReturns TRUE if successful or FALSE otherwise.
控制声道和音量以及图像的灰度等问题都是用trackbar来解决的
not image