Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CSliderCtrl and TB_THUMBTRACK

CSliderCtrl and TB_THUMBTRACK

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    Jawache
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • J Jawache

      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

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      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.

      War Pigs

      J 1 Reply Last reply
      0
      • C Chris Losinger

        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.

        War Pigs

        J Offline
        J Offline
        Jawache
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups