Код:
Код: Выделить всё
#include
#Include
#include
#include
$dd="DarkDragon"
_GDIPlus_StartUp()
_CreateGuiFace($dd)
Func _CreateGuiFace($title)
Global $main = GuiCreate($title, 640, 480)
GuiSetState()
;---Объявление и прорисовка---
_DrawImgs()
;---Рисуем фейс---
_DrawCtrl()
;---Loop---
While 1
If GUIGetMsg() = $GUI_EVENT_RESTORE Then
Sleep(100)
_DrawImgs()
EndIf
If GUIGetMsg() = $GUI_EVENT_CLOSE Then
_ProgShutdown()
EndIf
WEnd
;----------
EndFunc
Func _DrawImgs()
Global $hGraphic = _GDIPlus_GraphicsCreateFromHWND($main)
Global $bg = _GDIPlus_ImageLoadFromFile("Style\bg.png")
_GDIPlus_GraphicsDrawImage($hGraphic, $bg, 0, 0)
Global $plistbg = _GDIPlus_ImageLoadFromFile("Style\plist.png")
_GDIPlus_GraphicsDrawImage($hGraphic, $plistbg, 485, 25)
Global $bgchat = _GDIPlus_ImageLoadFromFile("Style\bgchat.png")
_GDIPlus_GraphicsDrawImage($hGraphic, $bgchat, 26, 25)
Global $messguibg = _GDIPlus_ImageLoadFromFile("Style\mess.png")
_GDIPlus_GraphicsDrawImage($hGraphic, $messguibg, 26, 419)
Global $but = GUICtrlCreateButton("Send", 545, 425,45,22)
GUICtrlSetBkColor($but,0xb0b0b0)
Global $butbg = _GDIPlus_ImageLoadFromFile("Style\but.png")
_GDIPlus_GraphicsDrawImage($hGraphic, $butbg, 530, 420)
EndFunc
Func _DrawCtrl()
Global $plist = GUICtrlCreateList( "Nik(rus)", 495, 35 ,110,365,0,2)
_GUICtrlListBox_AddString($plist,"1234")
GUICtrlSetBkColor($plist,0xb0b0b0)
Global $editchat = GUICtrlCreateEdit("123", 35, 35, 410, 365,0x0040+0x0004+0x0800)
GuiCtrlSetBkColor($editchat,0xb0b0b0)
Global $messgui = GUICtrlCreateEdit("Message here", 44, 427, 445, 19,0)
GUICtrlSetBkColor($messgui,0xb0b0b0)
EndFunc
Func _GDI_Shutdown()
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_ImageDispose($bg)
_GDIPlus_ImageDispose($plistbg)
_GDIPlus_ImageDispose($bgchat)
_GDIPlus_ImageDispose($messguibg)
_GDIPlus_ImageDispose($butbg)
GUICtrlDelete($but)
EndFunc
Func _GUI_Shutdown()
GUICtrlDelete($plist)
GUICtrlDelete($editchat)
GUICtrlDelete($messgui)
EndFunc
Func _ProgShutdown()
_GDI_Shutdown()
_GDIPlus_ShutDown()
GUIDelete()
Exit
EndFunc