Resizen von GUIRichEdits

  • Hi @all

    Ich habe ne frage und zwar:
    Wie kann ich es machen dass sich ein GUIRich Edit automatisch resizt
    hier mein aktueller Code:

    Spoiler anzeigen
    [autoit]

    #include <GUIRichEdit.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>

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

    #region - GUI Create
    $hGUI = GUICreate('',1100,700,-1,-1,$WS_MINIMIZEBOX+ $WS_CAPTION+ $WS_POPUP+ $WS_SYSMENU + $WS_MAXIMIZEBOX)
    $hRichEdit = _GUICtrlRichEdit_Create($hGUI,0,0,1100,700)

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

    GUISETSTATE(@SW_SHOW)

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

    #endregion

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

    #region - GUI SelectLoop
    While 1
    $pos = WinGetPos($hGUI)
    If $pos[2] <> 1100 or $pos[3] <> 700 Then
    ControlMove($hGUI,"",$hRichEdit,0,0,$pos[2],$pos[3])
    Endif
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    EndSelect
    WEnd
    #endregion

    [/autoit]

    Bei mir flackert es aber sehr

    Ich hoffe jemand hat eine lösung Parat

    Edit:
    Habe die RichEdit version von prog@ndy

  • Wenn ich es so mache :

    Spoiler anzeigen
    [autoit]

    #include <GUIRichEdit.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>

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

    #region - GUI Create
    $hGUI = GUICreate('',1100,700,-1,-1,$WS_MINIMIZEBOX+ $WS_CAPTION+ $WS_POPUP+ $WS_SYSMENU + $WS_MAXIMIZEBOX)
    $hRichEdit = _GUICtrlRichEdit_Create($hGUI,0,0,1100,700)

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

    GUISETSTATE(@SW_SHOW)

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

    #endregion

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

    #region - GUI SelectLoop
    While 1
    $pos = WinGetPos($hGUI)
    $c = ControlGetPos($hGUI,"",$hRichEdit)
    If $pos[2] <> $c[2] or $pos[3] <> $c[3] Then
    ControlMove($hGUI,"",$hRichEdit,0,0,$pos[2],$pos[3])
    Endif
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    EndSelect
    WEnd
    #endregion

    [/autoit]

    kann ich über den guirand hinausschreiben liegt das an einem stil von guirichedit_create oder an der größe meines editfeldes

  • du musst WinGetClientSize verwenden ;)

    Spoiler anzeigen
    [autoit]

    #include <GUIRichEdit.au3>
    #include <WindowsConstants.au3>
    #include <GUIConstants.au3>

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

    #region - GUI Create
    $hGUI = GUICreate('',1100,700,-1,-1,$WS_MINIMIZEBOX+ $WS_CAPTION+ $WS_POPUP+ $WS_SYSMENU + $WS_MAXIMIZEBOX)
    $hRichEdit = _GUICtrlRichEdit_Create($hGUI,0,0,1100,700)

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

    GUISETSTATE(@SW_SHOW)

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

    #endregion

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

    #region - GUI SelectLoop
    While 1
    $pos = WinGetClientSize($hGUI)
    $c = ControlGetPos($hGUI,"",$hRichEdit)
    If $pos[0] <> $c[2] or $pos[1] <> $c[3] Then
    ControlMove($hGUI,"",$hRichEdit,0,0,$pos[0],$pos[1])
    Endif
    $msg = GUIGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
    Exit
    EndSelect
    WEnd
    #endregion

    [/autoit]