#include <AutoRun.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Include <GDIPlus.au3>
#Include <WinAPIEx.au3>
_AutoRunAdd()
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("World of the Rest - Click'er", 339, 93, 194, 114)
$Label1 = GUICtrlCreateLabel("Игрок:", 18, 12, 33, 17)
$Login = GUICtrlCreateInput("", 78, 9, 121, 21)
$Label2 = GUICtrlCreateLabel("Пароль:", 11, 39, 40, 27)
$Pass = GUICtrlCreateInput("", 78, 36, 121, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
$Send = GUICtrlCreateButton("Старт", 10, 63, 75, 21, $BS_BITMAP)
$Exit = GUICtrlCreateButton("Выход", 125, 63, 75, 21, 0)
GUISetState(@SW_SHOW)
_GDIPlus_Startup()
$hPng = _GDIPlus_ImageLoadFromFile(@ScriptDir & '\Silverlight.png')
$hBitmap = _GDIPlus_DIBitmapCreateFromBitmap($hPng)
_GDIPlus_ImageDispose($hPng)
_GDIPlus_ShutDown()
;GUICtrlSendMsg(-1, $BM_SETIMAGE, $IMAGE_BITMAP, $hBitmap)
GUICtrlSendMsg(-1, 0x00F7, 0, $hBitmap)
GUISetState()
Do
Until GUIGetMsg() = -3
Func _GDIPlus_DIBitmapCreateFromBitmap($hBitmap)
Local $tBIHDR, $tMap, $pBits, $hImage, $hResult, $Width, $Height
$Width = _GDIPlus_ImageGetWidth($hBitmap)
$Height = _GDIPlus_ImageGetHeight($hBitmap)
If ($Width < 1) Or ($Height < 1) Then
Return 0
EndIf
$hImage = _GDIPlus_BitmapCloneArea($hBitmap, 0, 0, $Width, $Height, $GDIP_PXF32ARGB)
$tMap = _GDIPlus_BitmapLockBits($hImage, 0, 0, $Width, $Height, $GDIP_ILMREAD, $GDIP_PXF32ARGB)
$tBIHDR = DllStructCreate($tagBITMAPINFOHEADER)
DllStructSetData($tBIHDR, 'biSize', DllStructGetSize($tBIHDR))
DllStructSetData($tBIHDR, 'biWidth', $Width)
DllStructSetData($tBIHDR, 'biHeight', $Height)
DllStructSetData($tBIHDR, 'biPlanes', 1)
DllStructSetData($tBIHDR, 'biBitCount', 32)
DllStructSetData($tBIHDR, 'biCompression', $BI_RGB)
$hResult = _WinAPI_CreateDIBSection(0, $tBIHDR, $DIB_RGB_COLORS, $pBits)
If Not @error Then
_WinAPI_SetBitmapBits($hResult, $Width * $Height * 4, DllStructGetData($tMap, 'Scan0'))
EndIf
_GDIPlus_BitmapUnlockBits($hImage, $tMap)
_GDIPlus_BitmapDispose($hImage)
Return $hResult
EndFunc
#EndRegion ### END Koda GUI section ###
While 1
WEnd