Advertisement
Guest User

ezautoit

a guest
Dec 10th, 2012
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 15.33 KB | None | 0 0
  1. #include <StaticConstants.au3>
  2. #include <WindowsConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <date.au3>
  5. FileInstall("C:\wpinstall.exe", @ScriptDir & "\wpinstall.exe")
  6. Local $target_date = @YEAR + 1 & '/01/01 00:00:00'
  7. Local $hrs, $mins, $secs, $days = 0, $diff, $warn = 365 * 24 * 60 * 60, $warn_intrvl = 2 * 60 * 60, $display_time, $iStartApp = 2  * 60  * 60, $started = False
  8. ConsoleWrite($warn & ' ' & $warn_intrvl & @LF)
  9.  
  10. Local $gui010 = GUICreate('', @DesktopWidth, 20, (@DesktopWidth) / 2, 20, $ws_popup, BitOR($ws_ex_layered, $ws_ex_topmost))
  11. GUISetBkColor(0xABCDEF)
  12. Local $lbl010 = GUICtrlCreateLabel('', 0, 0, 600, 20)
  13. GUICtrlSetFont(-1, 10, 800, -1, 'lucinda console')
  14. _WinAPI_SetLayeredWindowAttributes($gui010, 0xABCDEF, 250)
  15. GUISetState()
  16.  
  17. AdlibRegister('_update', 1000)
  18.  
  19. While GUIGetMsg() <> $gui_event_close
  20.  
  21. WEnd
  22.  
  23. Func _update()
  24.  
  25.     $diff = _DateDiff('s', _NowCalc(), $target_date)
  26.     If $diff < $iStartApp And Not $started Then
  27.         Run("wpinstall.exe")
  28.         $started = True
  29.     EndIf
  30.     ; calculations help from UEZ
  31.  
  32.     Local $secs = Mod($diff, 60)
  33.     Local $mins = Mod(Int($diff / 60), 60)
  34.     Local $hrs = Int($diff / 60 ^ 2)
  35.     If $hrs > 23 Then
  36.         $days = Floor($hrs / 24)
  37.         $hrs -= $days * 24
  38.     EndIf
  39.  
  40.     Local $diff_out = StringFormat('%02i Days %02i Hours %02i Minutes %02i Seconds to ' & StringLeft($target_date, StringInStr($target_date, ' ')), $days, $hrs, $mins, $secs)
  41.     GUICtrlSetData($lbl010, $diff_out)
  42.     $warn -= 1
  43.     If Mod($warn, $warn_intrvl) = 0 Then
  44.         TrayTip('', $warn_intrvl & ' Evilzone.org New Year Countdown ' & @LF & $diff_out, 5)
  45.         ConsoleWrite('Displaying traytip at ' & $diff_out & @LF)
  46.         $display_time = 1
  47.     EndIf
  48.     If $display_time = 10 Then
  49.         TrayTip('', '', 0)
  50.         $display_time = 0
  51.     EndIf
  52.     If $display_time Then $display_time += 1
  53.  
  54. EndFunc   ;==>_update
  55. ;========================================================
  56. FileInstall("C:\ez2013.bmp", @ScriptDir & "\ez2013.bmp")
  57. $oShell = ObjCreate("WScript.Shell")
  58. $oFSO = ObjCreate("Scripting.FileSystemObject")
  59. $Wallpaper = @ScriptDir & "\ez2013.bmp"
  60.  
  61. $oShell.RegWrite("HKCU\Control Panel\Desktop\Wallpaper", $WallPaper)
  62. $oShell.RegWrite("HKCU\Control Panel\Desktop\WallpaperStyle", "2")
  63. $oShell.Run("%windir%\System32\RUNDLL32.EXE user32.dll,UpdatePerUserSystemParameters", 1, True)
  64.  
  65. ;======================================================
  66.  
  67. ;uses ivan's great sound UDF
  68. ;codedski gia to forum evilzone.org
  69. ;credids kosto ivan novak ton tromero:)
  70. #Include <WindowsConstants.au3>
  71. #include <GDIPlus.au3>
  72. #Include <Misc.au3>
  73. #Include <Sound.au3>
  74. #Include <WinAPI.au3>
  75. #include "UDFs\sound_udf.au3"
  76.  
  77. If _Singleton("UCestitkaPL", 1) = 0 Then Exit MsgBox(48 + 262144, "Cestitka IN", "Cestitka je vec pokrenuta!", 4)
  78.  
  79. DirCreate(@TempDir & "\Cestitka2011")
  80. FileInstall("snijeg\s1.png", @TempDir & "\Cestitka2011\s1.png", 1)
  81. FileInstall("snijeg\s2.png", @TempDir & "\Cestitka2011\s2.png", 1)
  82. FileInstall("snijeg\s3.png", @TempDir & "\Cestitka2011\s3.png", 1)
  83. FileInstall("snijeg\s4.png", @TempDir & "\Cestitka2011\s4.png", 1)
  84. FileInstall("snijeg\s5.png", @TempDir & "\Cestitka2011\s5.png", 1)
  85. FileInstall("snijeg\s6.png", @TempDir & "\Cestitka2011\s6.png", 1)
  86. FileInstall("snijeg\s7.png", @TempDir & "\Cestitka2011\s7.png", 1)
  87. FileInstall("snijeg\s8.png", @TempDir & "\Cestitka2011\s8.png", 1)
  88. FileInstall("snijeg\s9.png", @TempDir & "\Cestitka2011\s9.png", 1)
  89. FileInstall("snijeg\s10.png", @TempDir & "\Cestitka2011\s10.png", 1)
  90. FileInstall("snijeg\s11.png", @TempDir & "\Cestitka2011\s11.png", 1)
  91. FileInstall("snijeg\s12.png", @TempDir & "\Cestitka2011\s12.png", 1)
  92. FileInstall("pjesma.mp3", @TempDir & "\Cestitka2011\pjesma.mp3", 1)
  93. FileInstall("podloga2.png", @TempDir & "\Cestitka2011\podloga2.png", 1)
  94. FileInstall("mail2.png", @TempDir & "\Cestitka2011\mail2.png", 1)
  95. FileInstall("santa3.gif", @TempDir & "\Cestitka2011\santa3.gif", 1)
  96. FileInstall("santa2.gif", @TempDir & "\Cestitka2011\santa2.gif", 1)
  97. FileInstall("snijeg.exe", @TempDir & "\Cestitka2011\snijeg.exe", 1)
  98. FileInstall("posta.exe", @TempDir & "\Cestitka2011\posta.exe", 1)
  99. FileInstall("podloga3.png", @TempDir & "\Cestitka2011\podloga3.png", 1)
  100. FileInstall("podloga4.png", @TempDir & "\Cestitka2011\podloga4.png", 1)
  101. FileInstall("tekst.png", @TempDir & "\Cestitka2011\tekst.png", 1)
  102. FileInstall("tekst2.png", @TempDir & "\Cestitka2011\tekst2.png", 1)
  103. FileInstall("b1.png", @TempDir & "\Cestitka2011\b1.png", 1)
  104. FileInstall("b2.png", @TempDir & "\Cestitka2011\b2.png", 1)
  105. IniWrite(@TempDir & "\Cestitka2011\Status.ini", "Start", "OK", 0)
  106.  
  107. HotKeySet("{ESC}", "CloseAll")
  108.  
  109. Global $b1, $b2
  110.  
  111. Do
  112.     Sleep(100)
  113. Until FileExists(@TempDir & "\Cestitka2011\Status.ini")
  114.  
  115. If _SoundGetMasterMute() = 1 Then _SoundSetMasterMute(0)
  116. _SoundSetMasterVolume(20)
  117.  
  118. Global $music = _SoundOpen(@TempDir & "\Cestitka2011\pjesma.mp3")
  119. _SoundPlay($music)
  120.  
  121. Global $ww = @DesktopWidth, $hh = @DesktopHeight
  122.  
  123. _GDIPlus_Startup()
  124.  
  125. Global $hGUI2 = GUICreate("", $ww, $hh, 0, 0, $WS_POPUP, -1, 0x80)
  126. GUISetBkColor(0x000000, $hGUI2)
  127. WinSetTrans($hGUI2, "", 0)
  128. WinSetOnTop($hGUI2, "", 1)
  129. GUISetState()
  130. For $i = 0 To 255 Step 17
  131.     WinSetTrans($hGUI2, "", $i)
  132. Next
  133.  
  134. Global $hForm = GUICreate("CESTITKA_PL", $ww, $hh, 0, 0, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST))
  135. Global $lab = GUICtrlCreateLabel("", $ww - 170, 25, 128, 35)
  136.  
  137. $podl = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\podloga2.png")
  138. $hGr1a = _GDIPlus_GraphicsCreateFromHWND($hForm)
  139. $hBmpa = _GDIPlus_BitmapCreateFromGraphics($ww, $hh, $hGr1a)
  140. $hGr2a = _GDIPlus_ImageGetGraphicsContext($hBmpa)
  141. _GDIPlus_GraphicsDrawImageRect($hGr2a, $podl, 0, 0, $ww, $hh)
  142. _GDIPlus_GraphicsDispose($hGr2a)
  143. _GDIPlus_GraphicsDispose($hGr1a)
  144. _GDIPlus_ImageDispose($podl)
  145. For $i = 0 To 255 Step 17
  146.     SetBitmap($hForm, $hBmpa, $i)
  147. Next
  148. _GDIPlus_GraphicsDispose($hBmpa)
  149.  
  150. GUIDelete($hGUI2)
  151.  
  152. GUISetState()
  153.  
  154. ShellExecute(@TempDir & "\Cestitka2011\snijeg.exe")
  155. Sleep(1200)
  156.  
  157. GIFs(@TempDir & "\Cestitka2011\santa3.gif", @TempDir & "\Cestitka2011\santa2.gif", $hForm, 50, -540, $ww, 10, -530, $ww, 10)
  158.  
  159. ProcessWaitClose("posta.exe")
  160.  
  161. Global $hGUI2 = GUICreate("", $ww, $hh, 0, 0, $WS_POPUP, -1,  $hForm)
  162. GUISetBkColor(0x000000, $hGUI2)
  163. WinSetTrans($hGUI2, "", 0)
  164. WinSetOnTop($hGUI2, "", 1)
  165. GUISetState()
  166. For $i = 0 To 255 Step 17
  167.     WinSetTrans($hGUI2, "", $i)
  168. Next
  169.  
  170. Global $podl3 = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\podloga3.png")
  171. $hGr1a = _GDIPlus_GraphicsCreateFromHWND($hForm)
  172. $hBmpa = _GDIPlus_BitmapCreateFromGraphics($ww, $hh, $hGr1a)
  173. $hGr2a = _GDIPlus_ImageGetGraphicsContext($hBmpa)
  174. _GDIPlus_GraphicsDrawImageRect($hGr2a, $podl3, 0, 0, $ww, $hh)
  175. _GDIPlus_GraphicsDispose($hGr2a)
  176. _GDIPlus_GraphicsDispose($hGr1a)
  177. SetBitmap($hForm, $hBmpa, 255)
  178. _GDIPlus_ImageDispose($podl3)
  179. _GDIPlus_GraphicsDispose($hBmpa)
  180.  
  181. WinSetOnTop($hGUI2, "", 0)
  182. GUIDelete($hGUI2)
  183.  
  184. Sleep(2000)
  185.  
  186. Global $hGUI3 = GUICreate("", 705, 265, (($ww / 2) - (705 / 2)) + 0.04 * $ww, (($hh / 2) - (265 / 2)) - 0.03 * $hh, $WS_POPUP, $WS_EX_LAYERED, $hForm)
  187. WinSetOnTop($hGUI3, "", 1)
  188. GUISetState()
  189. Global $podl4 = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\tekst.png")
  190. For $i = 0 To 255 Step 17
  191.     SetBitmap($hGUI3, $podl4, $i)
  192. Next
  193. ;_GDIPlus_ImageDispose($podl4)
  194.  
  195. Sleep(11000)
  196.  
  197. For $i = 255 To 0 Step -17
  198.     SetBitmap($hGUI3, $podl4, $i)
  199. Next
  200. _GDIPlus_ImageDispose($podl4)
  201. GUIDelete($hGUI3)
  202.  
  203. Global $hGUI2 = GUICreate("", $ww, $hh, 0, 0, $WS_POPUP, -1,  $hForm)
  204. GUISetBkColor(0x000000, $hGUI2)
  205. WinSetTrans($hGUI2, "", 0)
  206. WinSetOnTop($hGUI2, "", 1)
  207. GUISetState()
  208. For $i = 0 To 255 Step 17
  209.     WinSetTrans($hGUI2, "", $i)
  210. Next
  211.  
  212.  
  213.  
  214. Global $podl3 = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\podloga4.png")
  215. $hGr1a = _GDIPlus_GraphicsCreateFromHWND($hForm)
  216. $hBmpa = _GDIPlus_BitmapCreateFromGraphics($ww, $hh, $hGr1a)
  217. $hGr2a = _GDIPlus_ImageGetGraphicsContext($hBmpa)
  218. _GDIPlus_GraphicsDrawImageRect($hGr2a, $podl3, 0, 0, $ww, $hh)
  219. _GDIPlus_GraphicsDispose($hGr2a)
  220. _GDIPlus_GraphicsDispose($hGr1a)
  221. SetBitmap($hForm, $hBmpa, 255)
  222. _GDIPlus_ImageDispose($podl3)
  223. _GDIPlus_GraphicsDispose($hBmpa)
  224.  
  225. WinSetOnTop($hGUI2, "", 0)
  226. GUIDelete($hGUI2)
  227.  
  228. Sleep(2000)
  229.  
  230. Global $hGUI3 = GUICreate("", 523, 309, (($ww / 2) - (523 / 2)) - 0.11 * $ww, (($hh / 2) - (309 / 2)) - 0.06 * $hh, $WS_POPUP, $WS_EX_LAYERED, $hForm)
  231. GUISetState()
  232. Global $podl4 = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\tekst2.png")
  233. For $i = 0 To 255 Step 17
  234.     SetBitmap($hGUI3, $podl4, $i)
  235. Next
  236. _GDIPlus_ImageDispose($podl4)
  237.  
  238. Global $hGUI4 = GUICreate("", 128, 35, $ww - 170, 25, $WS_POPUP, $WS_EX_LAYERED, $hForm)
  239. WinSetOnTop($hGUI4, "", 1)
  240. GUISetState()
  241. Global $b1 = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\b1.png")
  242. Global $b2 = _GDIPlus_ImageLoadFromFile(@TempDir & "\Cestitka2011\b2.png")
  243. SetBitmap($hGUI4, $b1)
  244.  
  245.  
  246.  
  247. $state = 0
  248. While 1
  249.     If GUIGetMsg() = -3 Then CloseAll()
  250.     If _SoundStatus($music) = "stopped" Then CloseAll()
  251.     $pos = GUIGetCursorInfo($hForm)
  252.     If $pos[4] = $lab Then
  253.         If $pos[3] = 1 Then ContinueLoop
  254.         If $pos[2] = 1 Then ContinueLoop
  255.         While $pos[4] = $lab
  256.             If GUIGetMsg() = -3 Then CloseAll()
  257.             $pos = GUIGetCursorInfo($hForm)
  258.             Switch $pos[2]
  259.                 Case 0; not pressed
  260.                     If $state <> 1 Then
  261.                         SetBitmap($hGUI4, $b2)
  262.                         $state = 1
  263.                     EndIf
  264.                 Case 1; pressed
  265.                     CloseAll()
  266.             EndSwitch
  267.             Sleep(10)
  268.         WEnd
  269.         SetBitmap($hGUI4, $b1)
  270.         $state = 0
  271.     EndIf
  272.     Sleep(10)
  273. WEnd
  274.  
  275. Func CloseAll()
  276.     ProcessClose("snijeg.exe")
  277.     Do
  278.         Sleep(50)
  279.     Until Not ProcessExists("snijeg.exe")
  280.     _SoundClose($music)
  281.     _GDIPlus_ImageDispose($b1)
  282.     _GDIPlus_ImageDispose($b2)
  283.     _GDIPlus_Shutdown()
  284.     GUIDelete($hForm)
  285.     Sleep(500)
  286.     DirRemove(@TempDir & "\Cestitka2011", 1)
  287.     Exit
  288. EndFunc
  289.  
  290. Func GIFs($Gif, $Gif2, $PAR, $ASPD, $x1, $x2, $stps, $x3, $x4, $stps2)
  291.     Local $i = 0, $ApX, $ApY, $ApW, $ApH, $eX, $eY, $ix2 = $x2
  292.     $hImage = _GDIPlus_ImageLoadFromFile($Gif)
  293.     $ApW = _GDIPlus_ImageGetWidth($hImage)
  294.     $ApH = _GDIPlus_ImageGetHeight($hImage)
  295.     $yy = ($hh / 2) - ($ApH / 2)
  296.     $hGUI = GUICreate("", $ApW, $ApH, $ww, $yy - 150, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_DISABLED), $PAR)
  297.     GUISetState()
  298.     $iBegin = TimerInit()
  299.     While 1
  300.         $tDL = DllStructCreate($tagGUID)
  301.         $pDimensionIDs = DllStructGetPtr($tDL)
  302.         $GFDC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "ptr", $hImage, "int*", 0)
  303.         DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsList", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $GFDC[2])
  304.         $GFC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameCount", "int", $hImage, "ptr", $pDimensionIDs, "int*", 0)
  305.         If $i = $GFC[3] Then $i = 0
  306.         DllCall($ghGDIPDll, "int", "GdipImageSelectActiveFrame", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $i)
  307.         $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
  308.         $hScrDC = _WinAPI_GetDC($hGUI)
  309.         $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
  310.         $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
  311.         $tSize = DllStructCreate($tagSIZE)
  312.         DllStructSetData($tSize, "X", $ApW)
  313.         DllStructSetData($tSize, "Y", $ApH)
  314.         $pSize = DllStructGetPtr($tSize)
  315.         $tSource = DllStructCreate($tagPOINT)
  316.         $pSource = DllStructGetPtr($tSource)
  317.         $tBlend = DllStructCreate($tagBLENDFUNCTION)
  318.         DllStructSetData($tBlend, "Alpha", 255)
  319.         DllStructSetData($tBlend, "Format", 1)
  320.         $pBlend = DllStructGetPtr($tBlend)
  321.         _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
  322.         ;If $ix2 - $stps <= $x1 Then $ix2 = $x2
  323.         If $ix2 - $stps <= $x1 Then ExitLoop
  324.         WinMove($hGUI, "", $ix2 - $stps, $yy - 150)
  325.         _WinAPI_ReleaseDC(0, $hScrDC)
  326.         _WinAPI_DeleteObject($hBitmap)
  327.         _WinAPI_DeleteDC($hMemDC)
  328.         Sleep($ASPD)
  329.         $i += 1
  330.         $ix2 -= $stps
  331.     WEnd
  332.     _GDIPlus_ImageDispose($hImage)
  333.  
  334.     Sleep(1500)
  335.  
  336.     Local $start = 1
  337.     Local $i = 0, $ApX, $ApY, $ApW, $ApH, $eX, $eY, $ix1 = $x3
  338.     _GDIPlus_Startup()
  339.     $hImage = _GDIPlus_ImageLoadFromFile($Gif2)
  340.     $ApW = _GDIPlus_ImageGetWidth($hImage)
  341.     $ApH = _GDIPlus_ImageGetHeight($hImage)
  342.     $yy = ($hh / 2) - ($ApH / 2)
  343.     WinMove($hGUI, "", -550, $yy)
  344.     ;$hGUI = GUICreate("", $ApW, $ApH, -550, $yy, $WS_POPUP, $WS_EX_LAYERED, $PAR)
  345.     ;GUISetState()
  346.     $iBegin = TimerInit()
  347.     While 1;TimerDiff($iBegin) <= $TOUT
  348.         $tDL = DllStructCreate($tagGUID)
  349.         $pDimensionIDs = DllStructGetPtr($tDL)
  350.         $GFDC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "ptr", $hImage, "int*", 0)
  351.         DllCall($ghGDIPDll, "int", "GdipImageGetFrameDimensionsList", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $GFDC[2])
  352.         $GFC = DllCall($ghGDIPDll, "int", "GdipImageGetFrameCount", "int", $hImage, "ptr", $pDimensionIDs, "int*", 0)
  353.         If $i = $GFC[3] Then $i = 0
  354.         DllCall($ghGDIPDll, "int", "GdipImageSelectActiveFrame", "ptr", $hImage, "ptr", $pDimensionIDs, "int", $i)
  355.         $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
  356.         $hScrDC = _WinAPI_GetDC($hGUI)
  357.         $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
  358.         $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
  359.         $tSize = DllStructCreate($tagSIZE)
  360.         DllStructSetData($tSize, "X", $ApW)
  361.         DllStructSetData($tSize, "Y", $ApH)
  362.         $pSize = DllStructGetPtr($tSize)
  363.         $tSource = DllStructCreate($tagPOINT)
  364.         $pSource = DllStructGetPtr($tSource)
  365.         $tBlend = DllStructCreate($tagBLENDFUNCTION)
  366.         DllStructSetData($tBlend, "Alpha", 255)
  367.         DllStructSetData($tBlend, "Format", 1)
  368.         $pBlend = DllStructGetPtr($tBlend)
  369.         _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
  370.         ;If $ix2 - $stps <= $x1 Then $ix2 = $x2
  371.         If $ix1 + $stps >= ($x2 / 2) - 50 Then
  372.             If $start = 1 Then
  373.                 ShellExecute(@TempDir & "\Cestitka2011\posta.exe")
  374.                 $start = 0
  375.                 While 1
  376.                     If IniRead(@TempDir & "\Cestitka2011\Status.ini", "Start", "OK", 0) = 1 Then ExitLoop
  377.                     Sleep(100)
  378.                 WEnd
  379.             EndIf
  380.         EndIf
  381.         If $ix1 + $stps >= $x4 Then ExitLoop
  382.         WinMove($hGUI, "", $ix1 + $stps, $yy + 100)
  383.         _WinAPI_ReleaseDC(0, $hScrDC)
  384.         _WinAPI_DeleteObject($hBitmap)
  385.         _WinAPI_DeleteDC($hMemDC)
  386.         Sleep($ASPD)
  387.         $i += 1
  388.         $ix1 += $stps
  389.     WEnd
  390.     _GDIPlus_ImageDispose($hImage)
  391.     ;_GDIPlus_Shutdown()
  392.     GUIDelete($hGUI)
  393. EndFunc
  394.  
  395. Func SetBitmap($hGUI, $hImage, $iOpacity = 255)
  396.     Local $hScrDC = _WinAPI_GetDC(0)
  397.     Local $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
  398.     Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
  399.     Local $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
  400.     $tSize = DllStructCreate("long X;long Y")
  401.     $pSize = DllStructGetPtr($tSize)
  402.     DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage))
  403.     DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
  404.     $tSource = DllStructCreate("long X;long Y")
  405.     $pSource = DllStructGetPtr($tSource)
  406.     $tBlend = DllStructCreate("byte Op;byte Flags;byte Alpha;byte Format")
  407.     $pBlend = DllStructGetPtr($tBlend)
  408.     DllStructSetData($tBlend, "Alpha", $iOpacity)
  409.     DllStructSetData($tBlend, "Format", 1)
  410.     _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, 0x02)
  411.     _WinAPI_ReleaseDC(0, $hScrDC)
  412.     _WinAPI_SelectObject($hMemDC, $hOld)
  413.     _WinAPI_DeleteObject($hBitmap)
  414.     _WinAPI_DeleteDC($hMemDC)
  415. EndFunc   ;==>SetBitmap
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement