Sign in to follow this  
Followers 0
TehWhale

Animated Gif, with no GUI

3 posts in this topic

Well, I know how to use Animated Gif's in my GUI's, but I don't want the user to be able to see the GUI, like loading screens.

I have this function, which is what I want, to hide the GUI, but keep the controls, it works without the Gif, but, not with it.

Func HideGUIDisplayCtrls($hWnd)
    GUISetStyle(0x80000000, 0x00000080+0x00000008, $hWnd)
    Local $sClassList = WinGetClassList($hWnd)
    Local $aClassList = StringSplit($sClassList, @LF)
    Local $sRetClassList = "", $sHold_List = "|"
    Local $aiInHold, $iInHold
    Local $aClassList, $aM_Mask, $aCtrlPos, $aMask
    For $i = 1 To UBound($aClassList) - 1
        If $aClassList[$i] = "" Then ContinueLoop
        If StringRegExp($sHold_List, "\|" & $aClassList[$i] & "~(\d+)\|") Then
            $aiInHold = StringRegExp($sHold_List, ".*\|" & $aClassList[$i] & "~(\d)+\|.*", 1)
            $iInHold = Number($aiInHold[UBound($aiInHold)-1])
            If $iInHold = 0 Then $iInHold += 1
            $aClassList[$i] &= "~" & $iInHold + 1
            $sHold_List &= $aClassList[$i] & "|"
            $sRetClassList &= $aClassList[$i] & @LF
        Else
            $aClassList[$i] &= "~1"
            $sHold_List &= $aClassList[$i] & "|"
            $sRetClassList &= $aClassList[$i] & @LF
        EndIf
    Next
    Local $Info = StringReplace(StringStripWS($sRetClassList, 3), "~", "")
    $aClassList = StringSplit($Info, @LF)
    $aM_Mask = DllCall("gdi32.dll", "long", "CreateRectRgn", "long", 0, "long", 0, "long", 0, "long", 0)
    For $i = 1 To UBound($aClassList) - 1
        $aCtrlPos = ControlGetPos($hWnd, '', $aClassList[$i])
        If Not IsArray($aCtrlPos) Then ContinueLoop
        $aMask = DllCall("gdi32.dll", "long", "CreateRectRgn", _
            "long", $aCtrlPos[0], _
            "long", $aCtrlPos[1], _
            "long", $aCtrlPos[0] + $aCtrlPos[2], _
            "long", $aCtrlPos[1] + $aCtrlPos[3])
        DllCall("gdi32.dll", "long", "CombineRgn", "long", $aM_Mask[0], "long", $aMask[0], "long", $aM_Mask[0], "int", 2)
    Next
    DllCall("user32.dll", "long", "SetWindowRgn", "hwnd", $hWnd, "long", $aM_Mask[0], "int", 1)
EndFunc

All I want the user to see is the Gif spinning...I have uploaded the Loading.gif I want to use :P

Share this post


Link to post
Share on other sites



Well you have to make the GIF transparent and the GUI layered :P

Made a test, but could flicker ( had to change sth in my GifAni UDF )

The example is in ZIP.

TestAni.zip


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

It flickers, and also when it rotates, you can see little white marks coming from the sides. I'm tring to make this look professional, but I'll play around with it.

It looks great on a white background.

I have a idea. I could get a .gif unpacker, that will take all the photos out of the .gif, and then I could use them, and then use GUICtrlCreatePic :P Heh. That might work.

Edited by SwiftBurns

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0