Sign in to follow this  

Help With Slider Control Please

Recommended Posts

hi there everyone im stuck on a problem and i cant seem to figure it out im trying to get the position of a slider but im not really sure if i have the right code could someone let me know if i have done somthing wrong please case WM_INITDIALOG: InitialiseCommonControls(); HWND hwtb; hwtb=GetDlgItem(hdwnd,SLIDER_SOUND); SendMessage(hwtb,TBM_SETRANGE,TRUE,MAKELONG(0, 100)); SendMessage(hwtb,TBM_SETPOS,TRUE,(LONG)0); return (INT_PTR)TRUE; case WM_HSCROLL : switch(wParam) { case TB_THUMBTRACK : char Poss[10]; int pos; pos = SendMessage(GetDlgItem(hwtb,SLIDER_SOUND),TBM_GETPOS,0,0); sprintf_s(Poss,"%d",pos); SetDlgItemText(hdwnd,STATIC_SOUND,Poss); break; } at the momment i just get 0 in my static lable all help is apperciated thanks

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this