您的位置:首页 > 其它

[ZZ]在MFC中有多个slider时OnHScroll函数判断方法

2010-11-30 10:12 99 查看
在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);
}


原帖地址:http://hi.baidu.com/ncudlz/blog/item/fba375dd6b6b74d18d1029d8.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: