Positionsänderung eines Fensters

  • So, nun habe ich gerade das Problem das ich nicht verstehe wieso dies nicht funktioniert:

    [autoit]

    Func SetBitmap($hGUI, $hImage, $iOpacity)
    Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend

    [/autoit][autoit][/autoit][autoit]

    $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)
    ;--------------------------------------------------------
    $tPoint = DllStructCreate($tagPOINT) ;gibt neue Coordinaten für das Fenster an:
    $pPoint = DllStructGetPtr($tPoint)
    DllStructSetData($tPoint, "X", 10) ;x = 10
    DllStructSetData($tPoint, "Y", 10) ;y = 10
    ;--------------------------------------------------------
    _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, $tPoint, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
    _WinAPI_ReleaseDC (0, $hScrDC)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC ($hMemDC)
    EndFunc

    [/autoit]


    Das damit geänderte Fenster nimmt keine neue Positon ein. Warum?