FlowMii coverflow all file loader

  • - Layerd window und png control
    - Wenn ich mehr als 100 file lade ist alles zu langsam
    - Centred cover probleme (gedrückte maus über centred-cover aber keine reaktion)
    - Crash (weisse ich nicht warum (manchmal))

    Ich gebe langsam auf :cursing:


    sorry für mein Deutsch

  • ich habe heute FlowMii unter XP getested, Ich war überrascht von den Ergebnissen "katastrophe"

    eins ist klar, Min directx 9.0c und Min 3GB ram unbedingt notwendig.

    Unter XP ändere zeile 276 / 303 / 304 um flowMii normal zu starten

    [autoit]

    276 $Main_Flow_gui = GUICreate($Titel, 1024, 670, -1, -1, $WS_POPUP);, $WS_EX_LAYERED)

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

    ;GUISetBkColor(0x01, $Main_Flow_gui)
    ;_WinAPI_SetLayeredWindowAttributes($Main_Flow_gui, 0x01, 0xFF, 0x03)

    [/autoit]


    Hier paar bilder.

    [Blockierte Grafik: http://img713.imageshack.us/img713/6819/flowmii1.png]

    [Blockierte Grafik: http://img225.imageshack.us/img225/518/flowmii2.png]

    [Blockierte Grafik: http://img683.imageshack.us/img683/7921/flowmii3.png]

    [Blockierte Grafik: http://img5.imageshack.us/img5/3887/flowmii4.png]

    Einmal editiert, zuletzt von getdot (2. September 2011 um 18:44)

  • Auf meinem xp sp3 2gb ram läuft es ohne Probleme und sehr Flüssig.
    ich nutze so etwas zwar nicht, aber es ist gut gemacht,sieht gut aus.
    es fehlt übrigens ein flatnopic.png.

  • Problem erledigt, habe das Problem gelöst (Button mit Alpha)

    [autoit]

    Func _CreateButtonBitmap($IDBTN, $BString, $BX, $BY, $BW, $BH, $BFont = "Comic Sans MS", $BSize = 10, $Bcol = "000000", $BFormat = 0, $BTNLImageSC = "", $BTNCImageSC = "", $BTNRImageSC = "")
    If StringLeft($Bcol, 2) = "0x" Then $Bcol = StringTrimLeft($Bcol, 2)

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

    $BCenter = $BW - ($BH * 2)

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

    $BTNCenterRes = _ResizeBTN($BTNCImageSC, $BCenter, $BH)
    Local $BTNNewBitmap = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromScan0", "int", $BCenter, "int", $BTNCenterRes[2], "int", 0, "int", 0x0026200A, "ptr", 0, "int*", 0)
    $BTNBitmap = $BTNNewBitmap[6]
    Local $BTNTexture = _GDIPlus_ImageGetGraphicsContext($BTNBitmap)
    For $i = 0 To $BCenter Step $BTNCenterRes[1]
    _GDIPlus_GraphicsDrawImage($BTNTexture, $BTNCenterRes[0], $i, 0)
    Next
    Local $hGraphicB = _GDIPlus_ImageGetGraphicsContext($BTNBitmap)
    Local $hBrush = _GDIPlus_BrushCreateSolid("0xFF" & $Bcol)
    Local $hFormat = _GDIPlus_StringFormatCreate($BFormat)
    Local $hFamily = _GDIPlus_FontFamilyCreate($BFont)
    Local $hFont = _GDIPlus_FontCreate($hFamily, $BSize)
    Local $BLayout = _GDIPlus_RectFCreate($BX, $BY, 0, 0)
    Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphicB, $BString, $hFont, $BLayout, $hFormat)

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

    $infotextResultW = DllStructGetData($aInfo[0], 3)
    $infotextResultH = DllStructGetData($aInfo[0], 4)
    $NewBX = ($BCenter - $infotextResultW) / 2
    $NewBY = ($BH - $infotextResultH) / 2

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

    Local $BNewLayout = _GDIPlus_RectFCreate($NewBX, $NewBY, 0, 0)
    Local $aNewInfo = _GDIPlus_GraphicsMeasureString($hGraphicB, $BString, $hFont, $BNewLayout, $hFormat)
    Local $aResult = _GDIPlus_GraphicsDrawStringEx($hGraphicB, $BString, $hFont, $aNewInfo[0], $hFormat, $hBrush)

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

    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_BrushDispose($hBrush)

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

    $BTNLeftRes = _ResizeBTN($BTNLImageSC, $BH, $BH)
    $BTNRightRes = _ResizeBTN($BTNRImageSC, $BH, $BH)

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

    $BTNComposite = _GDIPlus_GraphicsCreateFromHWND($Main_Flow_gui)
    $BTNCompositeBitmap = _GDIPlus_BitmapCreateFromGraphics($BW, $BH, $BTNComposite)
    $BTNCompositeGraphic = _GDIPlus_ImageGetGraphicsContext($BTNCompositeBitmap)
    Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($BTNBitmap)
    _GDIPlus_GraphicsDrawImageRect($BTNCompositeGraphic, $BTNLeftRes[0], 0, 0, $BH, $BH)
    _GDIPlus_GraphicsDrawImageRect($BTNCompositeGraphic, $BTNBitmap, $BH, 0, $BCenter, $BH)
    _GDIPlus_GraphicsDrawImageRect($BTNCompositeGraphic, $BTNRightRes[0], $BH + $BCenter, 0, $BH, $BH)

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

    SetBitmap($IDBTN, $BTNCompositeBitmap, 255, $BW, $BH)

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

    _GDIPlus_GraphicsDispose($BTNCompositeGraphic)
    _WinAPI_DeleteObject($BTNCompositeBitmap)
    _GDIPlus_BitmapDispose($BTNBitmap)
    _GDIPlus_GraphicsDispose($BTNTexture)
    EndFunc ;==>_CreateButtonBitmap

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

    Func _ResizeBTN($PicFile, $PicW, $PicH)
    Dim $ReturnData[3]
    Local $BTNImage = _GDIPlus_ImageLoadFromFile($PicFile)
    Local $BTNImageW = _GDIPlus_ImageGetWidth($BTNImage)
    Local $BTNImageH = _GDIPlus_ImageGetHeight($BTNImage)
    Local $BTNNewW = $PicW
    Local $BTNNewH = $PicH

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

    If $BTNImageW >= $BTNImageH Then
    $BTNImageH *= $BTNNewW / $BTNImageW
    $BTNImageW = $BTNNewW
    If $BTNImageH > $BTNNewH Then
    $BTNImageW *= $BTNNewH / $BTNImageH
    $BTNImageH = $BTNNewH
    EndIf
    Else
    $BTNImageW *= $BTNNewH / $BTNImageH
    $BTNImageH = $BTNNewH
    If $BTNImageW > $BTNNewW Then
    $BTNImageH *= $BTNNewW / $BTNImageW
    $BTNImageW = $BTNNewW
    EndIf
    EndIf

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

    $graphicsRes = _GDIPlus_GraphicsCreateFromHWND($Main_Flow_gui)
    $BitmapRes = _GDIPlus_BitmapCreateFromGraphics($BTNImageW, $BTNImageH, $graphicsRes)
    $GraphicRes = _GDIPlus_ImageGetGraphicsContext($BitmapRes)
    _GDIPlus_GraphicsDrawImageRect($GraphicRes, $BTNImage, 0, 0, $BTNImageW, $BTNImageH)
    _GDIPlus_ImageDispose($BTNImage)
    _GDIPlus_GraphicsDispose($GraphicRes)
    _WinAPI_DeleteObject($BitmapRes)

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

    $ReturnData[0] = $BitmapRes
    $ReturnData[1] = $BTNImageW
    $ReturnData[2] = $BTNImageH
    Return $ReturnData
    EndFunc ;==>_ResizeBTN

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

    Func SetBitmapRes($InImageRes, $iW, $iH)
    $graphicsRes = _GDIPlus_GraphicsCreateFromHWND($Main_Flow_gui)
    $hBitmapRes = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $graphicsRes)
    $hGraphicRes = _GDIPlus_ImageGetGraphicsContext($hBitmapRes)
    $hImageRes = _GDIPlus_ImageLoadFromFile($InImageRes)
    _GDIPlus_GraphicsDrawImageRect($hGraphicRes, $hImageRes, 0, 0, $iW, $iH)

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

    _GDIPlus_ImageDispose($hImageRes)
    _GDIPlus_GraphicsDispose($hGraphicRes)
    _WinAPI_DeleteObject($hBitmapRes)
    Return $hBitmapRes
    EndFunc ;==>SetBitmapRes

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

    Func SetBitmap($hGUI, $hImage, $iOpacity, $iW, $iH)
    Local $hScrDC = _WinAPI_GetDC(0)
    Local $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
    Local $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    Local $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
    $TSize = DllStructCreate("long X;long Y")
    $pSize = DllStructGetPtr($TSize)
    DllStructSetData($TSize, "X", $iW)
    DllStructSetData($TSize, "Y", $iH)
    $tSource = DllStructCreate("long X;long Y")
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate("byte Op;byte Flags;byte Alpha;byte Format")
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $iOpacity)
    DllStructSetData($tBlend, "Format", 1)
    _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, 0x02)
    _WinAPI_ReleaseDC(0, $hScrDC)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
    EndFunc ;==>SetBitmap

    [/autoit]
    Spoiler anzeigen