How to handle a Slider Control
-
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
-
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
-
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
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
-
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.
I m not Capturiong the Slider's THumb. HAve u any Sample.. plz send at zahid_ash@yahoo.com thanx
-
I m not Capturiong the Slider's THumb. HAve u any Sample.. plz send at zahid_ash@yahoo.com thanx
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.