Ребят помогите решить проблему - решил "залить" в скрипт картинки (пользовался http://autoit-script.ru/index.php/topic,2849.0.html#post_13) и наткнулся на такую беду, как GUI теперь отказывается работать, вернее оно работает, но мышкой ничего нельзя выбрать...
Код:
Region
#AutoIt3Wrapper_Res_File_Add=image001.bmp, 2, 200
#AutoIt3Wrapper_Res_File_Add=logo.png, PNG, LOGO
#EndRegion
#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <StaticConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#Include <GDIPlus.au3>
#Include <Icons.au3>
#Include <WinAPIEx.au3>
Opt("TrayAutoPause",0)
#Region ### START Koda GUI section ### Form=
$GUI = GUICreate("World of the Rest - Click'er", 339, 169, 194, 114)
$Pic1 = GUICtrlCreatePic("", 0, 0, 339, 168)
$Pic2 = GUICtrlCreatePic("", 215, 95,120, 70)
$Login = GUICtrlCreateInput("", 120, 9, 130, 21, -1, 1)
$Pass = GUICtrlCreateInput("", 120, 36, 130, 23, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL), 1)
$Host = GUICtrlCreateInput("http://worldofrest.com.ua", 120, 65, 130, 21, -1, 1)
$Udar = GUICtrlCreateInput("1", 120, 91, 55, 21, -1, 1)
$Obnovlenie = GUICtrlCreateInput("5", 120, 117, 55, 21, -1, 1)
$ReLogin = GUICtrlCreateInput("30", 120, 143, 55, 21, -1, 1)
$Send = GUICtrlCreateButton("", 260, 9, 74, 51, $BS_BITMAP)
$Exit = GUICtrlCreateButton("", 260, 65, 74, 22)
$hInstance = _WinAPI_GetModuleHandle(0)
$hBitmap = _WinAPI_LoadBitmap($hInstance, 200)
_SetHImage($Pic1, $hBitmap)
_WinAPI_DeleteObject($hBitmap)
_GDIPlus_Startup()
$hImage = _LoadResourceImage($hInstance, "PNG", "LOGO")
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
_GDIPlus_ImageDispose($hImage)
_GDIPlus_Shutdown()
_SetHImage($Pic2, $hBitmap)
_WinAPI_DeleteObject($hBitmap)
GUISetState()
#EndRegion ### END Koda GUI section ###
Do
Until GUIGetMsg() = -3
Func _LoadResourceImage($hInstance, $sResType, $sResName, $iResLanguage = 0)
Local $hInfo, $hData, $pData, $iSize, $hMem, $pMem, $hStream, $hImage
If $iResLanguage Then
$hInfo = _WinAPI_FindResourceEx($hInstance, $sResType, $sResName, $iResLanguage)
Else
$hInfo = _WinAPI_FindResource($hInstance, $sResType, $sResName)
EndIf
$hData = _WinAPI_LoadResource($hInstance, $hInfo)
$iSize = _WinAPI_SizeOfResource($hInstance, $hInfo)
$pData = _WinAPI_LockResource($hData)
If @error Then
Return SetError(1, 0, 0)
EndIf
$hMem = DllCall("kernel32.dll", "ptr", "GlobalAlloc", "uint", 2, "ulong_ptr", $iSize)
If @error Then
Return SetError(1, 0, 0)
EndIf
$pMem = DllCall("kernel32.dll", "ptr", "GlobalLock", "ptr", $hMem[0])
If @error Then
Return SetError(1, 0, 0)
EndIf
DllCall("kernel32.dll", "none", "RtlMoveMemory", "ptr", $pMem[0], "ptr", $pData, "ulong_ptr", $iSize)
DllCall("kernel32.dll", "int", "GlobalUnlock", "ptr", $hMem[0])
$hStream = _WinAPI_CreateStreamOnHGlobal($hMem[0])
If @error Then
Return SetError(1, 0, 0)
EndIf
_GDIPlus_Startup()
$hImage = DllCall("gdiplus.dll", "uint", "GdipCreateBitmapFromStream", "ptr", $hStream, "ptr*", 0)
If (@error) Or ($hImage[0]) Or (Not $hImage[2]) Then
$hImage = 0
EndIf
_GDIPlus_Shutdown()
DllCall("kernel32.dll", "ptr", "GlobalFree", "ptr", $hMem[0])
If Not IsArray($hImage) Then
Return SetError(1, 0, 0)
EndIf
Return $hImage[2]
EndFunc ;==>_LoadResourceImage