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. How to handle a Slider Control

How to handle a Slider Control

Scheduled Pinned Locked Moved C / C++ / MFC
jsonhelptutorial
5 Posts 3 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.
  • Z Offline
    Z Offline
    Zeeshan Bilal
    wrote on last edited by
    #1

    HI , I m biulding an application like Video Media player . I saw many appliction on Codeproject ,, but no one is of mine kind help I have a slider in it ,, to move the video postion same as in Windows Media Player. I m Using MCI Api's .... Slider Control only Gives three Message Handlers 1. CustomDraw (..........) 2, OutofMemory(..............) 3. ReleasedCapture(...) Which one i Should use.. Or some thing else way Means i want to click on slider thumb and move it ,, too n froo. or click on on any where on slider and thumb goes there. thanx

    G T 2 Replies Last reply
    0
    • Z Zeeshan Bilal

      HI , I m biulding an application like Video Media player . I saw many appliction on Codeproject ,, but no one is of mine kind help I have a slider in it ,, to move the video postion same as in Windows Media Player. I m Using MCI Api's .... Slider Control only Gives three Message Handlers 1. CustomDraw (..........) 2, OutofMemory(..............) 3. ReleasedCapture(...) Which one i Should use.. Or some thing else way Means i want to click on slider thumb and move it ,, too n froo. or click on on any where on slider and thumb goes there. thanx

      G Offline
      G Offline
      gmn
      wrote on last edited by
      #2

      use releasedcapture, getpos() of the slider, then play from that position. need to be sure of your current time format in relation to the slider values.

      Z 1 Reply Last reply
      0
      • Z Zeeshan Bilal

        HI , I m biulding an application like Video Media player . I saw many appliction on Codeproject ,, but no one is of mine kind help I have a slider in it ,, to move the video postion same as in Windows Media Player. I m Using MCI Api's .... Slider Control only Gives three Message Handlers 1. CustomDraw (..........) 2, OutofMemory(..............) 3. ReleasedCapture(...) Which one i Should use.. Or some thing else way Means i want to click on slider thumb and move it ,, too n froo. or click on on any where on slider and thumb goes there. thanx

        T Offline
        T Offline
        ThatsAlok
        wrote on last edited by
        #3

        Buddy, add ON_WM_SCROLL message In your application. or see my application shutdown timer,i have used slider ctrl in that-> http://www.codeproject.com/useritems/ShutDownAlarm.asp ----------------------------- "I Think It will Work" ----------------------------- Alok Gupta visit me at http://www.thisisalok.tk

        1 Reply Last reply
        0
        • G gmn

          use releasedcapture, getpos() of the slider, then play from that position. need to be sure of your current time format in relation to the slider values.

          Z Offline
          Z Offline
          Zeeshan Bilal
          wrote on last edited by
          #4

          I m not Capturiong the Slider's THumb. HAve u any Sample.. plz send at zahid_ash@yahoo.com thanx

          G 1 Reply Last reply
          0
          • Z Zeeshan Bilal

            I m not Capturiong the Slider's THumb. HAve u any Sample.. plz send at zahid_ash@yahoo.com thanx

            G Offline
            G Offline
            gmn
            wrote on last edited by
            #5

            this isnt an actual block of code as such, just bits pasted together to illustrate the point.... void CSPlayerDlg::OnReleasedcapturePosSlider(NMHDR* pNMHDR, LRESULT* pResult) { nextPos = m_position.GetPos() mciSendString("play current from 0 notify",0 ,0, this->GetSafeHwnd()); } you'd want to play from m_position.GetPos(), not from zero, you'll have to format the string appropriately.... you also want to set the slider range to the length of the file your playing.

            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