From: Mkennedy1102 on
I assumed that it functions in much the same way as the buddy window for a
CSpinButtonCtrl, but I don't see it actua;;y doing anything when I slide the
bar. I was testing the functionality of the CSliderCtrl to try and figuer
out why I can;'t get them to work properly, so I whipped up a quick dialog
based project with three sliders and three edits. I linked the sliders to
the edits, set the ranges on the sliders and executed the program. Sliding
the thumb on a slider causes absolutely nothing to happen in the "buddy"
window. Is this normal? Do I need to implement the display of the sliders
positionmyself? Why bother setting it as a buddy window then, you can use
any old window. Or, is there a problem in my commctl32.dll(or similar) that
is making my sliders not work as they are supposed to? The issue I'm ahving
seems to be that my slider controls are not sending notifications to their
parent window. I noticed this in another app I am working on, and which I
posted about here :

http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.vc.mfc&tid=81a5b2bd-d741-4daf-bd06-38db77a9efcb&p=1

So, back to my question.....am I diagnosing this correctly? Is the lack of
response in the "buddy" window another indicator that my controls are not
sending the notifications tha they should be sending? Is there a heaeer,
library or something else that I should be including to getthis to work? If
it helps, I'm running XP Pro SP2 and VS 6.0 Professional (Visual C++ 6.0).
Any kind of ideas greatly appreciated.
From: Jeff Partch [MVP] on
"Mkennedy1102" <Mkennedy1102(a)discussions.microsoft.com> wrote in message
news:C02B658C-E4F4-4767-A121-29D9C8C93C1D(a)microsoft.com...
> I assumed that it functions in much the same way as the buddy window for a
> CSpinButtonCtrl, but I don't see it actua;;y doing anything when I slide
the
> bar.

I think all it does is position the buddy windows centered at the left/top
or right/bottom of the slider/trackbar saving you the steps necessary to
calculate these coords yourself. It should also automatically reposition
them on resize/reposition of the slider/trackbar as well as cache the HWNDs
so you can retrieve them via CSliderCtrl::GetBuddy/TBM_GETBUDDY.
--
Jeff Partch [VC++ MVP]


From: Joseph M. Newcomer on
Showing some code might help. You also need to set the "Set Buddy Integer" style. Mostly,
the correct way to handle this is to put the edit control at tab position N and the spin
control at tab position N+1 and use the Auto-Buddy style.
joe

On Thu, 3 Mar 2005 14:47:02 -0800, Mkennedy1102 <Mkennedy1102(a)discussions.microsoft.com>
wrote:

>I assumed that it functions in much the same way as the buddy window for a
>CSpinButtonCtrl, but I don't see it actua;;y doing anything when I slide the
>bar. I was testing the functionality of the CSliderCtrl to try and figuer
>out why I can;'t get them to work properly, so I whipped up a quick dialog
>based project with three sliders and three edits. I linked the sliders to
>the edits, set the ranges on the sliders and executed the program. Sliding
>the thumb on a slider causes absolutely nothing to happen in the "buddy"
>window. Is this normal? Do I need to implement the display of the sliders
>positionmyself? Why bother setting it as a buddy window then, you can use
>any old window. Or, is there a problem in my commctl32.dll(or similar) that
>is making my sliders not work as they are supposed to? The issue I'm ahving
>seems to be that my slider controls are not sending notifications to their
>parent window. I noticed this in another app I am working on, and which I
>posted about here :
>
>http://msdn.microsoft.com/newsgroups/default.aspx?dg=microsoft.public.vc.mfc&tid=81a5b2bd-d741-4daf-bd06-38db77a9efcb&p=1
>
>So, back to my question.....am I diagnosing this correctly? Is the lack of
>response in the "buddy" window another indicator that my controls are not
>sending the notifications tha they should be sending? Is there a heaeer,
>library or something else that I should be including to getthis to work? If
>it helps, I'm running XP Pro SP2 and VS 6.0 Professional (Visual C++ 6.0).
>Any kind of ideas greatly appreciated.

Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm