在OnHScroll开始时添加几个CWnd*变量,在和参数中pScrollBar判断就可以了 void CPlayerDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar) { // TODO: Add your message handler code here and/or call default CWnd *pSliderPos = this->GetDlgItem(IDC_SLIDER_POS); CWnd *pSliderVolume = this->GetDlgItem(IDC_SLIDER_VOLUME); if (pScrollBar == pSliderVolume) { 。。。 。。。 } if (pScrollBar == pSliderPos) { 。。。 。。。 } CBitmapDialog::OnHScroll(nSBCode, nPos, pScrollBar); } |
|