' Code erzeugt mit F.Abbing's LemonViD Version 1.0.0.2 am 26.10.2012 um 20:13 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 nurso%, ilist%, smallicon%, largeicon%, vstatic1%, text1%, choicebox1%, text2%, edit1%, gridbox1%, edit2%, iconbutton1%
Def GetStockObject(1) !"GDI32","GetStockObject"
Def GetSysColor(1) !"USER32","GetSysColor"
Def GetParent(1) !"USER32","GetParent"
Def ImageList_Create(5) !"COMCTL32","ImageList_Create"
Def ImageList_ReplaceIcon(3) !"COMCTL32","ImageList_ReplaceIcon"
Def ImageList_Duplicate(1) !"COMCTL32","ImageList_Duplicate"
Def ImageList_GetIcon(3) !"COMCTL32","ImageList_GetIcon"
Def ExtractIconEx(5) !"SHELL32","ExtractIconEx"
Def GetDlgCtrlID(1) !"USER32","GetDlgCtrlID"
Def &COLOR_BTNFACE $F
Def &DEFAULT_GUI_FONT $11
Def &WM_COMMAND $111
Proc CreateImageList
ilist% = ImageList_Create(32, 32, $21, 0, 0)
ExtractIconEx("shell32.dll", 7, Addr(largeicon%), Addr(smallicon%), 1)
DeleteObject smallicon%
ImageList_ReplaceIcon(ilist%, -1, largeicon%)
DeleteObject largeicon%
Return ilist%
EndProc
Proc CreateElements
WindowStyle 26 | 512 | 2048
WindowTitle "Arbeitsfenster"
Window 280, 0 - 1390, 1000
Cls GetSysColor(&COLOR_BTNFACE)
SetDialogFont GetStockObject(&DEFAULT_GUI_FONT)
gridbox1% = Create("Gridbox", vstatic1%, "gridbox;0;592", 0, 0, 32, 608, 488)
edit1% = Create("Edit", vstatic1%, "edit", 344, 8, 216, 24)
text2% = Create("Text", vstatic1%, "Volltextsuche nach", 224, 8, 104, 24)
choicebox1% = Create("ChoiceBox", vstatic1%, 0, 72, 8, 120, 24)
text1% = Create("Text", vstatic1%, "Im Feld", 8, 8, 50, 24)
edit2% = Create("Edit", %hwnd, "edit", 272, 144, 136, 24)
iconbutton1% = Create("IconButton", %hwnd, ImageList_GetIcon(ilist%, 0, 0), 408, 144, 24, 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)
Subclass text1%, 1 : Subclass choicebox1%, 1 : Subclass text2%, 1 : Subclass edit1%, 1 : Subclass gridbox1%, 1
While 1
WaitInput
Case %umessage = 16 : BREAK
If Clicked(text1%) 'vstatic1% -> #window
ElseIf Clicked(choicebox1%) 'vstatic1% -> #window
ElseIf Clicked(text2%) 'vstatic1% -> #window
ElseIf Clicked(edit1%) 'vstatic1% -> #window
ElseIf Clicked(gridbox1%) 'vstatic1% -> #window
ElseIf Clicked(edit2%) '#window
ElseIf Clicked(iconbutton1%) '#window
EndIf
EndWhile
Subclass text1%, 0 : Subclass choicebox1%, 0 : Subclass text2%, 0 : Subclass edit1%, 0 : Subclass gridbox1%, 0
EndProc
Proc Main
CreateImageList
CreateElements
MainLoop
EndProc
Main
End
Alles anzeigen