Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


slider ctrl

This topic is 6009 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''m trying to use the slider ctrl in win gui (VC++ 6). In msdn it says the control sends notify messages to the parent window and you can override OnHScroll() or handle them directly using ON_NOTIFY. I tried both, but it just doesn''t seem to get any messages... code: void CIOD1::OnThumbPos(NMHDR*nh,long*ll) { int pos = ((CSliderCtrl*)GetDlgItem(SLIDER))->GetPos(); ioh->frame = ((float)pos/100.0f)*(float)ioh->count - 1; char temp[100]; sprintf(temp,"Frame: %d, Total: %d",ioh->frame+1,ioh->count); SetDlgItemText(L2,temp); } BEGIN_MESSAGE_MAP(CIOD1,CDialog) ON_NOTIFY(TB_THUMBPOSITION,SLIDER,OnThumbPos) What''s going on?

Share this post

Link to post
Share on other sites
My manual says that the TB_THUMBPOSITION message is sent when the left mouse button is release after the thumb is dragged. Did you drag the thumb? If not, that might be why you didn''t get the callback.

The TB_THUMBTRACK message is generated when "The thumb is dragged to a new position with the mouse".

The other messages a CSlider can get are as follow:


Do you get any of these messages?

Share this post

Link to post
Share on other sites
no dude, that''s what''s annoying. I don''t get any of the messages!

Any more ideas? Did anybody get this to work??

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!