回复 10 楼 砖家的谎言
向导的哪个工程是什么意思
回复 9 楼 top398
void Main_OnHScroll(HWND hwnd, HWND hwndCtl, UINT code, int pos){
switch(GetDlgCtrlID(hwndCtl)) //得到控件ID
{
//控制音量滑块
case IDC_SLIDERVOLUME:
{
int voice = SendMessage(GetDlgItem(hwnd, IDC_SLIDERVOLUME), TBM_GETPOS, 0, 0); //得到当前滑块的音量值
//TBM_GETPOS:返回当前滑块位置所代表的值(逻辑位置)
TCHAR szVoice[256];
wsprintf(szVoice, "setaudio %s volume to %d", shortName, voice); //将音量设置到滑块的值
mciSendString(szVoice, (LPTSTR)NULL, 0, 0);
}
break;
case IDC_SLIDER: //歌曲的进度条
{
if(SB_ENDSCROLL == code)
{
long lPosition = SendMessage(GetDlgItem(hwnd, IDC_SLIDER), TBM_GETPOS, 0, 0); //得到当前的进度值
//itoa(lPosition, curTime, 10);
TCHAR strPos[256];
wsprintf(strPos, "play %s from %ld", shortName, lPosition);
mciSendString(strPos, (LPTSTR)NULL, 0, 0); //
mciSendString(strPos, (LPTSTR)NULL, 0, 0);
}
}
break;
这句代码是什么意思if(SB_ENDSCROLL == code)