Button unterhalb von Childfenstern

  • Hi,

    hab folgendes Problem. Habe eine GUI auf der ein Button ist. Zu dieser GUI ist eine ander GUI als Child gesetzt. Problem ist nun, dass dieser Button auch über diesem Childfenster ist wenn es über diesen bewegt wird.

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Desktop = GUICreate("Desktop", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_VISIBLE), BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    GUICtrlCreateButton("Test", 100, 80, 60, 60, BitOR($BS_NOTIFY, $WS_GROUP, $WS_TABSTOP, $WS_VISIBLE, $BS_FLAT))

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443, 192, 124, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_CHILD, $WS_GROUP, $WS_VISIBLE, $WS_BORDER, $WS_CLIPSIBLINGS), -1, $Desktop)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

    2 Mal editiert, zuletzt von chip (24. Februar 2010 um 20:15)

  • Hi,
    also so klappt es bei mir. Mit

    [autoit]

    $WS_MINIMIZE

    [/autoit]

    in Zeile 13

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Desktop = GUICreate("Desktop", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_VISIBLE), BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    GUICtrlCreateButton("Test", 100, 80, 60, 60, BitOR($BS_NOTIFY, $WS_GROUP, $WS_TABSTOP, $WS_VISIBLE, $BS_FLAT))

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443, 192, 124, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_CHILD,$WS_MINIMIZE, $WS_GROUP, $WS_VISIBLE, $WS_BORDER, $WS_CLIPSIBLINGS), -1, $Desktop)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    mfG

    Einmal editiert, zuletzt von JufFThreeManiac (24. Februar 2010 um 19:50)

  • Bei mir auch, obwohl das mit dem Befehl seltsamer Effekt ist.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • Ok kommando zurück geht doch nicht. Sobald man einmal GUISetState(@SW_HIDE) und dann wieder GUISetState(@SW_SHOW) macht sind die Buttons wieder oben drüber.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • so?

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Desktop = GUICreate("Desktop", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_VISIBLE), BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    GUICtrlCreateButton("Test", 100, 80, 60, 60, BitOR($BS_NOTIFY, $WS_GROUP, $WS_TABSTOP, $WS_VISIBLE, $BS_FLAT))

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443, 192, 124, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_GROUP, $WS_VISIBLE, $WS_BORDER, $WS_CLIPSIBLINGS), $WS_EX_TOPMOST)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]
  • So ist das Fenster aber leider nichtmehr als Child.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • $WS_CHILD durch $WS_POPUP + $WS_EX_MDICHILD ersetzen.

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>

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

    #region ### START Koda GUI section ### Form=
    $Desktop = GUICreate("Desktop", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_POPUP, $WS_VISIBLE), BitOR($WS_EX_TOPMOST, $WS_EX_WINDOWEDGE))
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    GUICtrlCreateButton("Test", 100, 80, 60, 60, BitOR($BS_NOTIFY, $WS_GROUP, $WS_TABSTOP, $WS_VISIBLE, $BS_FLAT))

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

    #region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 625, 443, 192, 124, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_GROUP, $WS_VISIBLE, $WS_BORDER, $WS_CLIPSIBLINGS), $WS_EX_MDICHILD, $Desktop)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    //Edit: Ne, doch nicht :S

  • Naja wenn garnichts Hilft muss ich halt vom Child weg kommen. Schade eigentlich.

    Andy hat mir ein Schnitzel gebacken aber da war ein Raupi drauf und bevor Oscar das Bugfixen konnte kam Alina und gab mir ein AspirinJunkie.

  • Hallo Chip,

    wie wäre es damit:

    Spoiler anzeigen
    [autoit]

    #include <WindowsConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <ButtonConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Desktop = GUICreate("Desktop", @DesktopWidth/2, @DesktopHeight/2, 0, 0, BitOR($WS_POPUP, $WS_VISIBLE), BitOR($WS_EX_CONTROLPARENT,$WS_EX_WINDOWEDGE))
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    GUICtrlCreateButton("Test", 100, 80, 60, 60, BitOR($BS_NOTIFY, $WS_GROUP, $WS_TABSTOP, $WS_VISIBLE, $BS_FLAT))

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", @DesktopWidth/4, @DesktopHeight/4, 250, 50, BitOR($WS_MINIMIZEBOX, $WS_SYSMENU, $WS_CAPTION, $WS_GROUP, $WS_VISIBLE, $WS_BORDER), $WS_EX_MDICHILD, $Desktop)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit
    EndSwitch
    WEnd

    [/autoit]

    mfg (Auto)Bert