Ocrana
asked on
CSliderCtrl Click
Hello,
I use a CSliderCtrl and the HScroll for the position change. This works well for move the thumb, but it do not work if I click into the line. Normaly if I click into the line, the tumb will go to this position. How I have to expand the HScroll that it will be work.
Attached the function I use currently.
Ocrana
I use a CSliderCtrl and the HScroll for the position change. This works well for move the thumb, but it do not work if I click into the line. Normaly if I click into the line, the tumb will go to this position. How I have to expand the HScroll that it will be work.
Attached the function I use currently.
Ocrana
void CAudioGrabSource::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
if (pScrollBar->GetSafeHwnd() == mAGrabPlayPos.GetSafeHwnd())
{
switch (nSBCode)
{
case TB_PAGEDOWN:
case SB_THUMBTRACK:
m_bScrolling = true;
break;
case SB_THUMBPOSITION:
m_cAudioTrackPlayer.Seek((float)mAGrabPlayPos.GetPos());
break;
case SB_ENDSCROLL:
m_bScrolling = false;
break;
default:
break;
}
}
__super::OnHScroll(nSBCode, nPos, pScrollBar);
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.