Gui + SplashText zu Parent & Child

  • ist das möglich?

    ich möchte das mein hauptfenster und ein splashtext zu parent und child werden, damit diese die gleichen aktionen ausführen und nicht unabhängig von einander reagieren.
    winapi_setparent ging nicht, danach war der splashscreen immer verschwunden.

    oder gibts eine andere, schnelle möglichkeit, ohne ein gui selber basteln zu müssen?

  • Hiho, habs gelöst.

    habe ein teil-script von sandin benommen, der dies im window manager v0.1 genutzt hat.

    sieht dann so aus:

    Spoiler anzeigen
    [autoit]


    GUISetState(@SW_DISABLE)
    Local $position = WinGetPos($Form1_1)
    Local $trans_text1 = _TransparentTextWindow("MyTextGUI", "HTML-Export", $position[2]/1.16, $position[2]/8, 1, 1, $font, 400, 0x003366, 1, -1, -1, 1, False)
    Local $position2 = WinGetPos($trans_text1)
    WinMove($trans_text1, "", $position[0]+$position[2]/2-$position2[2]/2, $position[1]+$position[3]/2-$position2[3]/2)
    ;~ WinSetTrans($trans_text1, "", 180)
    ;WinSetOnTop($trans_text1, "", 1)
    Local $transss = 254
    for $i = 1 to 10
    $transss-=10
    WinSetTrans($Form1_1, "", $transss)
    Next
    DllCall($dll, "int", "AnimateWindow", "hwnd", $trans_text1, "int", 300, "long", 0x00080000);fade-in
    GUISetState(@SW_SHOW, $trans_text1)
    WinSetOnTop($trans_text1, "", 0)
    $file = StringTrimRight(GUICtrlRead($Input3), 7) & ".html"
    FileDelete($file)
    _FileCreate($file)
    FileOpen($file, 1)
    $GuiRead = GUICtrlRead($Checkbox1)
    If $GuiRead = 1 Then
    $Rows = _GUICtrlListView_GetItemCount($List1)
    For $i = 1 To $Rows
    FileWrite($file, _GUICtrlListView_GetItemText($List1, $i, 1) & '<br>')
    Next
    Else
    FileWrite($file, '<A NAME="Index">Index</A> <br><br>')
    FileWrite($file, '<A HREF="#0-9">0-9</A> &nbsp; <A HREF="#A">A</A> &nbsp; <A HREF="#B">B</A> &nbsp; <A HREF="#C">C</A> &nbsp; <A HREF="#D">D</A> &nbsp; <A HREF="#E">E</A> &nbsp; <A HREF="#F">F</A> &nbsp; <A HREF="#G">G</A> &nbsp; <A HREF="#H">H</A> &nbsp; <A HREF="#I">I</A> &nbsp; <A HREF="#J">J</A> &nbsp; <A HREF="#K">K</A> &nbsp; <A HREF="#L">L</A> &nbsp; <A HREF="#M">M</A> &nbsp; <A HREF="#N">N</A> &nbsp; <A HREF="#O">O</A> &nbsp; <A HREF="#P">P</A> &nbsp; <A HREF="#Q">Q</A> &nbsp; <A HREF="#R">R</A> &nbsp; <A HREF="#S">S</A> &nbsp; <A HREF="#T">T</A> &nbsp; <A HREF="#U">U</A> &nbsp; <A HREF="#V">V</A> &nbsp; <A HREF="#W">W</A> &nbsp; <A HREF="#X">X</A> &nbsp; <A HREF="#Y">Y</A> &nbsp; <A HREF="#Z">Z</A> &nbsp; <br><br>')
    FileWrite($file, '<A NAME="0-9">0-9</A><br><br>')
    _SQLite_Exec(-1,"Select Title From DB Where substr (Title,1,1) between '0' and '9' Order by Title", "_InsertHTML"); like '0%' or Title like '1%' or Title like '2%' or Title like '3%' or Title like '4%' or Title like '5%' or Title like '6%' or Title like '7%' or Title like '8%' or Title like '9%' Order by Title", "_InsertHTML")
    For $i = Asc("A") To Asc("Z")
    FileWrite($file, '<BLOCKQUOTE><A HREF="#Index">back</A></BLOCKQUOTE> <A NAME="' & Chr($i) & '">' & Chr($i) & '</A><br><br>')
    _SQLite_Exec(-1,"Select Title From DB Where Title like '" & Chr($i) & "%' Order by Title", "_InsertHTML")
    Next
    FileWrite($file, '<BLOCKQUOTE><A HREF="#Index">back</A></BLOCKQUOTE><br><br>')
    _SQLite_Exec(-1,"Select rowid, * From DB Order by Title", "_InsertHTML2")
    EndIf
    ShellExecute($file)
    DllCall($dll, "int", "AnimateWindow", "hwnd", $trans_text1, "int", 300, "long", 0x00090000);fade-out
    GUIDelete($trans_text1)
    for $i = 1 to 10
    $transss+=10
    WinSetTrans($Form1_1, "", $transss)
    Next
    GUISetState(@SW_ENABLE)

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

    Func _TransparentTextWindow($h_WinTitle, $s_WinText, $i_WinWidth, $i_WinHeight, $i_WinXPosn = -1, $i_WinYPosn = -1, _
    $s_TextFont = -1, $i_FontWeight = -1, $v_FontColor = -1, $i_FontItalics = 0, $i_FontUnderline = 0, $i_FontStrikeOut = 0, $i_Taskbar = 0, $i_WinExist = False, $i_hwnd = 0)
    Local Const $DEFAULT_CHARSET = 0 ; ANSI character set
    Local Const $OUT_CHARACTER_PRECIS = 2
    Local Const $CLIP_DEFAULT_PRECIS = 0
    Local Const $PROOF_QUALITY = 2
    Local Const $FIXED_PITCH = 1
    Local Const $RGN_XOR = 3
    If $h_WinTitle = "" Then $h_WinTitle = "Notice"
    If $s_WinText = "" Then $s_WinText = "Error"
    If $i_WinWidth < 1 Or $i_WinWidth > @DesktopWidth Then SetError(1)
    If $i_WinHeight < 1 Or $i_WinHeight > @DesktopHeight Then SetError(1)
    If $i_WinXPosn = -1 Then $i_WinXPosn = (@DesktopWidth / 2) - ($i_WinWidth / 2)
    If $i_WinYPosn = -1 Then $i_WinYPosn = (@DesktopHeight / 2) - ($i_WinHeight / 2)
    If $i_WinXPosn < 1 Or $i_WinXPosn > (@DesktopWidth - $i_WinWidth) Then SetError(1)
    If $i_WinYPosn < 1 Or $i_WinYPosn > (@DesktopHeight - $i_WinHeight) Then SetError(1)
    If @error Then Return
    If $s_TextFont = "" Or $s_TextFont = -1 Then $s_TextFont = "Microsoft Sans Serif"
    If $i_FontWeight = "" Or $i_FontWeight = -1 Then $i_FontWeight = 450
    If $v_FontColor = "" Or $v_FontColor = -1 Then $v_FontColor = "0xFF0000"
    If $i_FontItalics <> 1 Then $i_FontItalics = 0
    If $i_FontUnderline <> 1 Then $i_FontUnderline = 0
    If $i_FontStrikeOut <> 1 Then $i_FontStrikeOut = 0
    If $i_Taskbar <> 1 Then
    if $i_WinExist = False Then
    Local $h_GUI = GUICreate($h_WinTitle, $i_WinWidth, $i_WinHeight, $i_WinXPosn, _
    $i_WinYPosn, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $Form1_1)
    Else
    Local $h_GUI = WinGetHandle($i_hwnd)
    EndIf
    Else ; hide tray icon
    if $i_WinExist = False Then
    Local $h_GUI = GUICreate($h_WinTitle, $i_WinWidth, $i_WinHeight, $i_WinXPosn, _
    $i_WinYPosn, $WS_POPUP, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW), $Form1_1)
    Else
    Local $h_GUI = WinGetHandle($i_hwnd)
    EndIf
    EndIf
    GUISetBkColor($v_FontColor)
    Local $hDC = DllCall($dll, "int", "GetDC", "hwnd", $h_GUI)
    Local $hMyFont = DllCall("gdi32.dll", "hwnd", "CreateFont", "int", $i_WinHeight, _
    "int", 0, "int", 0, "int", 0, "int", $i_FontWeight, "int", $i_FontItalics, _
    "int", $i_FontUnderline, "int", $i_FontStrikeOut, "int", $DEFAULT_CHARSET, _
    "int", $OUT_CHARACTER_PRECIS, "int", $CLIP_DEFAULT_PRECIS, _
    "int", $PROOF_QUALITY, "int", $FIXED_PITCH, "str", $s_TextFont)
    Local $hOldFont = DllCall("gdi32.dll", "hwnd", "SelectObject", "int", $hDC[0], _
    "hwnd", $hMyFont[0])
    DllCall("gdi32.dll", "int", "BeginPath", "int", $hDC[0])
    DllCall("gdi32.dll", "int", "TextOut", "int", $hDC[0], "int", 0, "int", 0, _
    "str", $s_WinText, "int", StringLen($s_WinText))
    DllCall("gdi32.dll", "int", "EndPath", "int", $hDC[0])
    Local $hRgn1 = DllCall("gdi32.dll", "hwnd", "PathToRegion", "int", $hDC[0])
    Local $rc = DllStructCreate("int;int;int;int")
    DllCall("gdi32.dll", "int", "GetRgnBox", "hwnd", $hRgn1[0], _
    "ptr", DllStructGetPtr($rc))
    Local $hRgn2 = DllCall("gdi32.dll", "hwnd", "CreateRectRgnIndirect", _
    "ptr", DllStructGetPtr($rc))
    DllCall("gdi32.dll", "int", "CombineRgn", "hwnd", $hRgn2[0], "hwnd", $hRgn2[0], _
    "hwnd", $hRgn1[0], "int", $RGN_XOR)
    DllCall("gdi32.dll", "int", "DeleteObject", "hwnd", $hRgn1[0])
    DllCall($dll, "int", "ReleaseDC", "hwnd", $h_GUI, "int", $hDC[0])
    DllCall($dll, "int", "SetWindowRgn", "hwnd", $h_GUI, "hwnd", $hRgn2[0], "int", 1)
    DllCall("", "int", "SelectObject", "int", $hDC[0], "hwnd", $hOldFont[0])
    Return $h_GUI
    EndFunc

    [/autoit]