When I change the position of a slider I simultaneously want to update a
static control with the current position of the slider.
For that problem I will have to use the function OnHScroll, but it only
works for CScrollBar controls?
How can I solve this problem?
Thank you for solving my problem.
Johan Machielse
Johan,
I believe that the slider control sends WM_HSCROLL messages as well as
the scroll bars, so it should work.
What have you tried that didn't work?
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.
> How can I solve this problem?
Johan,
Although the parameter is defined that way, it's really just a CWnd
pointer.
Compare the window handle against that of your control. For example:
if ( GetDlgItem( IDC_SLIDER1 )->m_hWnd == pScrollBar->m_hWnd )
{
/* It's IDC_SLIDER1 */