出错了....帮帮我
#include <GDIPlus.au3>#include <WinAPI.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global Const $AC_SRC_ALPHA=1
$hImage=_GDIPlus_ImageLoadFromFile("Jens_003.png")
$F=GUICreate("中国",200,200,250,250,$WS_POPUP,$WS_EX_LAYERED)
SetBitmap($F,$hImage,240)
while 1
Sleep(100)
WEnd
Func SetBitmap($hGUI, $hImage, $iOpacity)
Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend
$hScrDC= _WinAPI_GetDC(0)
$hMemDC= _WinAPI_CreateCompatibleDC($hScrDC)
$hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
$hOld= _WinAPI_SelectObject($hMemDC, $hBitmap)
$tSize = DllStructCreate($tagSIZE)
$pSize = DllStructGetPtr($tSize)
DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth ($hImage))
DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
$tSource = DllStructCreate($tagPOINT)
$pSource = DllStructGetPtr($tSource)
$tBlend= DllStructCreate($tagBLENDFUNCTION)
$pBlend= DllStructGetPtr($tBlend)
DllStructSetData($tBlend, "Alpha" , $iOpacity)
DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)
_WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
_WinAPI_ReleaseDC (0, $hScrDC)
_WinAPI_SelectObject($hMemDC, $hOld)
_WinAPI_DeleteObject($hBitmap)
_WinAPI_DeleteDC($hMemDC)
_GDIPlus_ShutDown ()
EndFunc
为什么出现这个问题呢
[ 本帖最后由 xkbin 于 2008-9-5 13:50 编辑 ] = =嘿嘿,再调用*任何*gdip函数前,请先保证你已经启动了gdip的dll:face (13):
页:
[1]