Hallo,
das SpinEdit mag nicht komplett in den Hintergrund!
Und legt man es auf einen Control, dann passt es wieder mit Clicked nicht.
Code
' Code erzeugt mit F.Abbing's LemonViD Version 1.0.0.3 am 06.01.2013 um 22:01 Uhr,
' Spenden-Button, sowie weitere Freeware-Tools für XProfan auf [url=http://frabbing.net]Webpage Frabbing[/url]
' Technischer Support auf [url=http://www.paules-pc-forum.de/forum/xprofan]XProfan - Paules-PC-Forum.de[/url] und [url=http://purebasic.fr/german]PureBoard • Foren-Übersicht[/url]
' --------------------------------------------------------------------------------------------------
Declare Dummy%[]
Declare button1%, button2%, button3%
Def @Show(1) @ShowWindow(@&(1), 1)
Def @Hide(1) @ShowWindow(@&(1), 0)
Def GetStockObject(1) !"GDI32","GetStockObject"
Def GetSysColor(1) !"USER32","GetSysColor"
Def GetParent(1) !"USER32","GetParent"
Def GetDlgCtrlID(1) !"USER32","GetDlgCtrlID"
Def &COLOR_BTNFACE $F
Def &DEFAULT_GUI_FONT $11
Def &PBM_SETRANGE $401
Def &PBM_SETPOS $402
Def &WM_COMMAND $111
Proc CreateElements
WindowStyle 26 | 512 | 2048
WindowTitle "Arbeitsfenster"
Window 280, 0 - 1409, 855
Cls GetSysColor(&COLOR_BTNFACE)
SetDialogFont GetStockObject(&DEFAULT_GUI_FONT)
Dummy%[1] = Create("Text", %hwnd, "text", 160, 64, 160, 32)
Dummy%[2] = Create("Edit", %hwnd, "edit", 168, 128, 120, 24)
Dummy%[3] = Create("MultiEdit", %hwnd, "multiedit", 176, 192, 160, 80)
Dummy%[4] = Create("GroupBox", %hwnd, "groupbox", 432, 72, 160, 80)
Dummy%[5] = Control("SysLink", "<a>syslink</a>", $50000000, 440, 192, 160, 24, %hwnd, $4000, %hInstance, 0)
Dummy%[6] = Create("Button", %hwnd, "button", 448, 256, 96, 24)
Dummy%[7] = Create("TabCtrl", %hwnd, "tabctrl", 688, 64, 300, 200)
Dummy%[8] = Control("Static", "", $50000000, 1048, 72, 200, 100, %hwnd, $4001, %hInstance, $20000)
Dummy%[9] = Create("Listbox", %hwnd, 0, 168, 328, 160, 120)
AddString( Dummy%[9], "listbox")
Dummy%[10] = Create("Gridbox", %hwnd, "gridbox;0;144", 0, 392, 328, 160, 150)
Dummy%[11] = Control("SysMonthCal32", "", $54000000, 632, 336, 200, 200, %hwnd, $4002, %hInstance, 0)
Dummy%[12] = Create("DateEdit", %hwnd, Date$(0), 896, 328, 120, 24)
Dummy%[13] = Create("CheckBox", %hwnd, "checkbox", 888, 384, 150, 24)
Dummy%[14] = Create("RadioButton", %hwnd, "radiobutton", 896, 440, 150, 24)
Dummy%[15] = Create("TreeView", %hwnd, 0, 1096, 224, 160, 120)
Treeview("InsertItem", Dummy%[15], 0, 0, "treeview")
Dummy%[16] = Create("ChoiceBox", %hwnd, 0, 1112, 384, 120, 24)
Dummy%[17] = Create("HScroll", %hwnd, "", 1120, 440, 120, 24)
Dummy%[18] = Create("SpinEdit", %hwnd, "1;1;100", 912, 496, 60, 24)
Dummy%[19] = Control("MSCtls_Progress32", "", $50000000, 1016, 496, 120, 24, %hwnd, $4003, %hInstance, 0)
SendMessage( Dummy%[19], &PBM_SETRANGE, 0, MakeLong(0, 100))
SendMessage( Dummy%[19], &PBM_SETPOS, 50, 0)
Dummy%[20] = Create("HtmlWin", %hwnd, "[url=http://www.xprofan.de]XProfan - eine einfache Programmiersprache[/url]", 1, 176, 504, 160, 120)
button1% = Create("Button", %hwnd, "Show", 360, 720, 96, 24)
button2% = Create("Button", %hwnd, "Hide", 512, 720, 96, 24)
button3% = Create("Button", %hwnd, "Ende", 680, 720, 96, 24)
EndProc
SubClassProc
Select %smessage
CaseOf $114, $115
SendMessage(%hwnd, %smessage, &swparam, &slparam)
CaseOf $101, $202, $205, $208
SendMessage(%hwnd, &WM_COMMAND, MakeLong(GetDlgCtrlID(&swnd), 0), &swnd)
EndSelect
Endproc
Proc MainLoop
UserMessages 16
ShowWindow(%hwnd, 1)
While 1
WaitInput
Case %umessage = 16 : BREAK
If Clicked(button1%) '#window
WhileLoop 20
@Show(Dummy%[&Loop])
EndWhile
ElseIf Clicked(button2%) '#window
WhileLoop 20
@Hide(Dummy%[&Loop])
EndWhile
ElseIf Clicked(button3%) '#window
BREAK
EndIf
EndWhile
EndProc
Proc Main
CreateElements
MainLoop
EndProc
Main
End
Alles anzeigen