Posts: 35
Threads: 13
Joined: Feb 2011
i have a question about msctls_trackbar32 what im trying to do is make it were if i scroll it across it changes the text on stacic text but im not really sure how i would get it to do that say i have 10 different static text i want it to change to
example the first bar on the trackbar would be - Text 1 , the second bar - Text 2 , and so on how would i get it to do that when i first create the trackbar it only has 2 lines first and last how do i add to that and make it change the text on static test.
i tryed and sat here and tryed a few things before i came and asked the question so if you can help i would appreciate it
Posts: 153
Threads: 33
Joined: Aug 2009
Your Question is hard to read !! Not sure if that is what u lookin for...
Changes Text if you scroll trackbar
Function
Dialog2
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("Dialog2" &Dialog2 0)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 172 "Dialog"
;1 Button 0x54030001 0x4 122 146 48 14 "OK"
;2 Button 0x54030000 0x4 172 146 48 14 "Cancel"
;3 msctls_trackbar32 0x54030003 0x0 10 4 26 166 ""
;4 Static 0x54000000 0x0 42 10 94 12 "Position 0"
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,SendMessage id(3 hDlg) TBM_SETRANGE 0 10<<16
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_VSCROLL
,int i=SendMessage(id(3 hDlg) TBM_GETPOS 0 0)
,_s.format("Position %i" i);_s.setwintext(id(4 hDlg))
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
Posts: 35
Threads: 13
Joined: Feb 2011
yes kinda but i was wanting it to face the other way and not so long
Posts: 153
Threads: 33
Joined: Aug 2009
lol @ not so long.. less code or less positions?
Posts: 153
Threads: 33
Joined: Aug 2009
horizontal less positions
Function
Dialog2
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
if(!ShowDialog("Dialog2" &Dialog2 0)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 218 114 "Dialog"
;1 Button 0x54030001 0x4 108 86 48 14 "OK"
;2 Button 0x54030000 0x4 162 86 48 14 "Cancel"
;4 Static 0x54000001 0x0 6 36 206 10 "Position 0"
;3 msctls_trackbar32 0x54030000 0x0 6 8 206 22 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030208 "*" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,SendMessage id(3 hDlg) TBM_SETRANGE 0 1<<16 ;; the 1 is the Range/Positions
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_HSCROLL
,int i=SendMessage(id(3 hDlg) TBM_GETPOS 0 0)
,_s.format("Position %i" i);_s.setwintext(id(4 hDlg))
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1