MFC怎样控制音乐大小
3个回答
展开全部
DWORD CPlayWave::SetVolume(HWND hWnd,DWORD Value)
{
DWORD dwResult=0;
MCI_DGV_SETAUDIO_PARMS mciSetAudioPara;
mciSetAudioPara.dwCallback = (DWORD)hWnd;
mciSetAudioPara.dwItem = MCI_DGV_SETAUDIO_VOLUME;
mciSetAudioPara.dwValue = Value; //音量值(0--1000)
if(m_ElementID)
{
mciSendCommand(m_ElementID, MCI_SETAUDIO, MCI_DGV_SETAUDIO_VALUE | MCI_DGV_SETAUDIO_ITEM, (DWORD)(LPVOID)&mciSetAudioPara);
m_ElementID=0;
}
return dwResult;
}
{
DWORD dwResult=0;
MCI_DGV_SETAUDIO_PARMS mciSetAudioPara;
mciSetAudioPara.dwCallback = (DWORD)hWnd;
mciSetAudioPara.dwItem = MCI_DGV_SETAUDIO_VOLUME;
mciSetAudioPara.dwValue = Value; //音量值(0--1000)
if(m_ElementID)
{
mciSendCommand(m_ElementID, MCI_SETAUDIO, MCI_DGV_SETAUDIO_VALUE | MCI_DGV_SETAUDIO_ITEM, (DWORD)(LPVOID)&mciSetAudioPara);
m_ElementID=0;
}
return dwResult;
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询