| |
|
|
- Page 1 - |
|
ByteAttack | So I would me the zusätzliches Control TrackBar wish. with Create("HTrack.... and Create("VTrack.... as example.
Currently resolve I the something umständlich so: CompileMarkSeparationUSERMESSAGES 16
$H windows.ph
$H commctrl.ph
Declare Ende%,TrackBar&,TrackBar2&,Font&,TB1&,TB2&
WindowStyle 30
WindowTitle "TrackBar"
Window %maxX,0-380,200
Font& = Create("Font","Verdana",13,0,0,0,0)
SetDialogFont Font&
CLS ~GetSysColor(15)
' ############ TrackBar mit Skala
Create("Text",%hwnd,"TrackBar mit Skala",15,10,200,24)
TrackBar& = Control("MSCtls_TrackBar32", "", $54010061,10,30,300,35,%hwnd,$4001,%hInstance, 0)
SendMessage(TrackBar&, ~TBM_SETRANGE, 0, MakeLong(0, 100))'Bereich
SendMessage(TrackBar&, ~TBM_SETPOS, 1, 30)'Aktuelle Position
SendMessage(TrackBar&, ~TBM_SETTICFREQ, 10, 0)'Teiler für die Skala
TB1&=Create("Text",%hwnd,"30",320,35,30,25)
SetFont TB1&,Font&
' ############ TrackBar Schmal
Create("Text",%hwnd,"TrackBar Schmal",15,80,200,24)
TrackBar2& = Control("MSCtls_TrackBar32", "", $54010050,10,100,300,25,%hwnd,$4001,%hInstance, 0)
SendMessage(TrackBar2&, ~TBM_SETRANGE, 0, MakeLong(0, 100))'Bereich
SendMessage(TrackBar2&, ~TBM_SETPOS, 1, 30)'Aktuelle Position
TB2&=Create("Text",%hwnd,"30",320,105,30,25)
SetFont TB2&,Font&
SetWindowPos %hwnd=(%maxX/2-190),(%maxY/2-100)-380,200;0
WhileNot ende%
WaitInput
Case %Umessage=16:end
SetText TB1&,Str$(SendMessage(TrackBar&, ~TBM_GETPOS, 0, 0))
SetText TB2&,Str$(SendMessage(TrackBar2&, ~TBM_GETPOS, 0, 0))
EndWhile
|
|
|
| |
|
|
|
« this Posting watts as Solution marked. » |
|
Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/28/15 ▲ |
|
|
|
|
|
Jörg Sellmeyer | something less umständlich would it by then, if You you a procedure save (z. B. in a Include), The You then simply Call can: CompileMarkSeparationUSERMESSAGES 16
$H windows.ph
$H commctrl.ph
Declare TrackBar&,Font&
WindowStyle 30
WindowTitle "TrackBar"
Window 380,200
Font& = Create("Font","Verdana",13,0,0,0,0)
SetDialogFont Font&
CLS ~GetSysColor(15)
Proc NewTrackbar
Parameters hwnd&,X%,Y%,B%,H%,Bereich%,Pos&,Freq&',Stil&
Declare TB&
TB& = Control("MSCtls_TrackBar32", "", $54010061,X%,Y%,B%,H%,hwnd&,$4001,%hInstance, 0)
SendMessage(TB&, ~TBM_SETRANGE, 0, MakeLong(0, Bereich%))'Bereich
SendMessage(TB&, ~TBM_SETPOS, 1, Pos&)'Aktuelle Position
SendMessage(TB&, ~TBM_SETTICFREQ, Freq&, 0)'Teiler für die Skala
EndProc
TrackBar& = NewTrackbar(%hwnd,10,10,300,35,200,50,10)
SetFont TrackBar&,Font&
While 1
WaitInput
Case %Umessage = 16:Break
Wend
so minimizes the future Schreibarbeit on very a row. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/28/15 ▲ |
|
|
|
|
ByteAttack | already clear, was indeed only an example-code.
Please with the Quelltexten IMMER The Variable end% using. ( the bring David on The palm tree ) |
|
|
| |
|
|
|
| |
|
| |
|
|
|
Jörg Sellmeyer | |
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 08/28/15 ▲ |
|
|
|