• Advertisement
Sign in to follow this  

Help With Slider Control Please

This topic is 3356 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

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
Advertisement
Sign in to follow this  

  • Advertisement