CSliderCtrl and TB_THUMBTRACK
-
I don't know whether my VC is messing up or if my MSDN is missing some entries. I'm trying to handle the TB_THUMBTRACK message for my slider control, ClassWizard has no entry for it and although MSDN mentions it it doesn't specify the format of the handling function?? How do i handle this Message? Asim Hussain e: asim@jawache.net w: www.jawache.net
-
I don't know whether my VC is messing up or if my MSDN is missing some entries. I'm trying to handle the TB_THUMBTRACK message for my slider control, ClassWizard has no entry for it and although MSDN mentions it it doesn't specify the format of the handling function?? How do i handle this Message? Asim Hussain e: asim@jawache.net w: www.jawache.net
is there any reason you want to do a thumb-track on the slider? you get the same results by just using OnHScroll:
void CSettings::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
CSliderCtrl *theThing=(CSliderCtrl*)pScrollBar;if (theThing==(CSliderCtrl *)GetDlgItem(IDC_CONTROL_I_WANT_TO_WATCH))
{
pos = theThing->GetPos();
}
}this will be called every time the thumb moves (just like a THUMBTRACK event on a scrollbar) -c
As always, it's bread and circuses. And while bread is down right now, circuses are way up.
-
is there any reason you want to do a thumb-track on the slider? you get the same results by just using OnHScroll:
void CSettings::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
CSliderCtrl *theThing=(CSliderCtrl*)pScrollBar;if (theThing==(CSliderCtrl *)GetDlgItem(IDC_CONTROL_I_WANT_TO_WATCH))
{
pos = theThing->GetPos();
}
}this will be called every time the thumb moves (just like a THUMBTRACK event on a scrollbar) -c
As always, it's bread and circuses. And while bread is down right now, circuses are way up.
Thanks.. I did it the hard way .. tracking the mouse. I'll remember that for the future though. Asim Hussain e: asim@jawache.net w: www.jawache.net