Source / code snippets | | | | Frank Abbing | the profane SpinEdits-Control - I sags time in all forthrightness - sees ugly from with his disruption between Edit and Pfeilen. of my opinion to is the even one bow... there's but a automatisierte and simply To programmierende alternative - the UpDown-Control. optional as Dezimal- or Hexadezimal-Edit (unfortunately only C-Style). here one Testcode: CompileMarkSeparationDeclare xdec&, xhex&, font&
Def GetSysColor(1) !USER32,GetSysColor
Cls GetSysColor(15)
font& = Create(Font,MS Sans Serif,10,0,0,0,0)
SetDialogFont font&
Dezimal-Edit
Create(EDIT,%HWnd,,8,8,64,20)
xdec&=Control(MSCTLS_UPDOWN32, ,$54000192,72,8,16,20, %hwnd, 2019, %hInstance, $00000000)
SendMessage(xdec&,$467,0,60) 60 = Ausgangszahl
SendMessage(xdec&,$46f,40,1440) 40 bis 1440 = Mini-und Maximalwert
Hexadezimal-Edit
Create(EDIT,%HWnd,,8,32,64,20)
xhex&=Control(MSCTLS_UPDOWN32, ,$54000192,72,32,16,20, %hwnd, 2019, %hInstance, $00000000)
SendMessage(xhex&,$46d,16,0) 10 = Dezimal / 16 = Hexadezimal
SendMessage(xhex&,$467,0,60) 60 = Ausgangszahl
SendMessage(xhex&,$46f,40,1440) 40 bis 1440 = Mini-und Maximalwert
While 1
WaitInput
Case %key=2:Break
EndWhile
End
gives yet some Messages More. Z.B. can certainly go, the itself the Edit the position and Size the UpDown-Controls automatically anpasst (left and rechsbündig). too is it possible, the The values of in front begin To count, once one Überlauf stattgefunden has. too Tausender-Markierungen are slight einzustellen. naturally can the Control too each x-arbitrary Edit allocated go. Voreingestellt is (How in my example) the before it lastly generierte Edit-Control.
plenty joke at experiment! |
| | | | |
| | GDL | Hi,
I will same test times.
Hello Georg |
| | | | |
| | Jörg Sellmeyer | Something like can too yet make: CompileMarkSeparation $H windows.ph
$H messages.ph
Declare xdec&, xhex&, font&
Cls ~GetSysColor(15)
SetDialogFont ~GetStockObject($11)
Dezimal-Edit
Create(EDIT,%HWnd,,8,8,64,20)
xdec&=Control(MSCTLS_UPDOWN32, ,$54000192,72,8,16,20, %hwnd, 2019, %hInstance, $00000000)
SendMessage(xdec&,$467,0,60)60 = Ausgangszahl
SendMessage(xdec&,$46f,40,1440)40 bis 1440 = Mini-und Maximalwert
Hexadezimal-Edit
Create(EDIT,%HWnd,,8,32,64,20)
xhex&=Control(MSCTLS_UPDOWN32, ,$54000192,72,32,16,20, %hwnd, 2019, %hInstance, $00000000)
SendMessage(xhex&,$46d,16,0)10 = Dezimal / 16 = Hexadezimal
SendMessage(xhex&,$467,0,60)60 = Ausgangszahl
SendMessage(xhex&,$46f,40,1440)40 bis 1440 = Mini-und Maximalwert
Var l& = Create(Listbox,%hwnd,,8,56,80,19)
SetStyle l&,1,GetStyle(l&,1) | ~ws_ex_right
WhileLoop -9,9
AddString(l&,Wert: + Str$(&Loop))
Wend
While 1
WaitInput
Case %key=2:Break
EndWhile
End
|
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/04/07 ▲ |
| |
| | Uwe ''Pascal'' Niemeier | Hello people!
high ne Variante: CompileMarkSeparationwindow 100,100-300,300
$H Messages.ph
$H commctrl.ph
create(text,%hwnd,,50,50,50,20)
var UD&=~CreateUpDownControl($54000192,0,0,0,0,%hwnd,1,0,0,10000,-10000,50)
setwindowpos UD&=50,100-50,50
declare a#
dim a#,24
long a#,0=0---zu Beginn 1er zählen
long a#,4=1
long a#,8=2---nach 2 Sekunden 10er zählen
long a#,12=10
long a#,16=4--nach 4 Sekunden 100er zählen
long a#,20=100
sendmessage(UD&,~UDM_SETACCEL,3,a#)
while 1
waitinput
endwhile
this is the disadvantage the ständigen Vereinfachungen with Profan: such delicacies get quick in to be hooked, and then becomes to further Vereifachungen screamed...
SeeYou Pascal |
| | | | |
| | Jörg Sellmeyer | Well, at least so similar can this effect on the Profancontrol utilize: CompileMarkSeparationwindow 100,100-300,300
Def UDM_GetBuddy(1) SendMessage(&(1),$046A,0,0)
$H Messages.ph
$H commctrl.ph
create(text,%hwnd,,50,50,50,20)
Var UD& = Create(SpinEdit,%hwnd,0;-10000;10000,10,80,100,20)
VAR UDBud& = UDM_GetBuddy(UD&)
declare a#
dim a#,24
long a#,0=0---zu Beginn 1er zählen
long a#,4=1
long a#,8=2---nach 2 Sekunden 10er zählen
long a#,12=10
long a#,16=4--nach 4 Sekunden 100er zählen
long a#,20=100
sendmessage(UDBud&,~UDM_SETACCEL,3,a#)
while 1
waitinput
endwhile
|
| | | Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 11/05/07 ▲ |
| |
| | Frank Abbing | @Pascal: The Message can itself naturally on my obiges UpDown-Control utilize. in the Übrigen using Rolands Spinedit even these API. |
| | | | |
| | RGH | even if this Thread already 7,5 years (!) old is: I have in X3 The meanwhile of Microsoft as "veraltet" marked API "createUpDownControl" by the actually Variante with "createwindow(MSCTLS_UPDOWN32" supplant. the sees not only something rather from, separate allows too values, The over the 16-bit-area go out: CompileMarkSeparationDeclare xdec&, xhex&, font&, hspin&
Def GetSysColor(1) !"USER32.DLL","GetSysColor"
Cls GetSysColor(15)
font& = Create("Font","MS Sans Serif",10,0,0,0,0)
SetDialogFont font&
' Dezimal-Edit
Create("EDIT",%HWnd,"",8,8,64,20)
xdec&=Control("MSCTLS_UPDOWN32", "",$54000192,72,8,16,20, %hwnd, 2019, %hInstance, $00000000)
SendMessage(xdec&,$467,0,60)' 60 = Ausgangszahl
SendMessage(xdec&,$46f,40,1440)' 40 bis 1440 = Mini-und Maximalwert
' Hexadezimal-Edit
Create("EDIT",%HWnd,"",8,32,64,20)
xhex&=Control("MSCTLS_UPDOWN32", "",$54000192,72,32,16,20, %hwnd, 2019, %hInstance, $00000000)
SendMessage(xhex&,$46d,16,0)' 10 = Dezimal / 16 = Hexadezimal
SendMessage(xhex&,$467,0,60)' 60 = Ausgangszahl
SendMessage(xhex&,$46f,40,1440)' 40 bis 1440 = Mini-und Maximalwert
' Profan
hSpin& = Create("SpinEdit", %hWnd, "60; -100; 100", 8, 56, 80, 20)
While 1
WaitInput
Case %key=2:Break
EndWhile
End
|
| | | XProfan X2Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 06/28/15 ▲ |
| |
| | Michael W. | class.
what me at testing auffiel: in the Interpreter functions the (c)-Menu, but compiled functions not. |
| | | XProfan X3System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 06/29/15 ▲ |
| |
| | RGH | the was always so: in the Interpreter becomes The Info-Box to that Interpreter displayed and then %menuitem on 254 staid. in the finished Program (EXE or Runtime) becomes only %menuitem on 254 staid. If the Programmer in the program hereon not reacted, happens even nothing.
the was original for virtual, that here the Programmer its own copyright-Info setting. and in the finished Program must Yes not absolutely the copyright-Info of XProfan drin stand.
the standing too so somewhere in the Help.
Greeting Roland |
| | | Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4 | 06/29/15 ▲ |
| |
|
Zum QuelltextTopic-Options | 16.569 Views |
Themeninformationenthis Topic has 6 subscriber: |