Hallo Forum,
habe folgendes Problem, sobald ich die erste Gui verschiebe, verschiebe ich nur Gui1, GUI2 wird nicht mit verschoben.
Da ich lange pause gemacht habe fällt mir leider nicht der Befehl ein wie ich die Gui verankern kann, danke für die Hilfe...
Beispiel:
[autoit]#include <GUIConstantsEx.au3>
#include <ScrollBarConstants.au3>
#include <GuiScrollBars.au3>
#include <WindowsConstants.au3>
$gui = GUICreate("Forum ", 633, 447, 190, 220)
$acalabeltop = GUICtrlCreateLabel("Forum", 240, 8, 200)
GUICtrlSetFont($acalabeltop, 18, "", "", "Copperplate Gothic Bold")
GUISetBkColor(0xFFFFFF)
$weiter = GUICtrlCreateButton("Weiter", 448, 410, 100, 25)
$abbrechen = GUICtrlCreateButton("Beenden", 264, 410, 100, 25)
$zurueck = GUICtrlCreateButton("Zurück", 72, 410, 100, 25)
GUICtrlCreateGroup("Bereich zum scrollen", 16, 73, 601, 286)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUICtrlSetFont(-1, 10, 400, 4, "MS Sans Serif")
GUICtrlCreateLabel("Telefonnummer:", 200, 376, 80, 17)
$telefon = GUICtrlCreateInput("", 304, 374, 121, 21)
;~ $Pic1 = GUICtrlCreatePic($inifilepath & "logo.jpg", 485, 0,"","", "")
GUISetState(@SW_SHOW,$gui)
$hChild = GUICreate("Scrollbereich",581,263,26,88,$WS_POPUP,$WS_EX_MDICHILD,$gui)
_GUIScrollBars_Init($hChild)
_GUIScrollBars_ShowScrollBar($hChild, $SB_HORZ,False) ; horizontale Scrollbar verstecken
GUICtrlCreateButton("test",100,100,100,20)
GUISetState(@SW_SHOW,$hChild)
GUIRegisterMsg($WM_VSCROLL, "WM_VSCROLL")
While 1
;~ danke
WEnd
Func WM_VSCROLL($hWnd, $Msg, $wParam, $lParam)
#forceref $Msg, $wParam, $lParam
Local $nScrollCode = BitAND($wParam, 0x0000FFFF)
Local $index = -1, $yChar, $yPos
Local $Min, $Max, $Page, $Pos, $TrackPos
For $x = 0 To UBound($aSB_WindowInfo) - 1
If $aSB_WindowInfo[$x][0] = $hWnd Then
$index = $x
$yChar = $aSB_WindowInfo[$index][3]
ExitLoop
EndIf
Next
If $index = -1 Then Return 0
; Get all the vertial scroll bar information
Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT)
$Min = DllStructGetData($tSCROLLINFO, "nMin")
$Max = DllStructGetData($tSCROLLINFO, "nMax")
$Page = DllStructGetData($tSCROLLINFO, "nPage")
; Save the position for comparison later on
$yPos = DllStructGetData($tSCROLLINFO, "nPos")
$Pos = $yPos
$TrackPos = DllStructGetData($tSCROLLINFO, "nTrackPos")
Switch $nScrollCode
Case $SB_TOP ; user clicked the HOME keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Min)
Case $SB_BOTTOM ; user clicked the END keyboard key
DllStructSetData($tSCROLLINFO, "nPos", $Max)
Case $SB_LINEUP ; user clicked the top arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos - 1)
Case $SB_LINEDOWN ; user clicked the bottom arrow
DllStructSetData($tSCROLLINFO, "nPos", $Pos + 1)
Case $SB_PAGEUP ; user clicked the scroll bar shaft above the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos - $Page)
Case $SB_PAGEDOWN ; user clicked the scroll bar shaft below the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $Pos + $Page)
Case $SB_THUMBTRACK ; user dragged the scroll box
DllStructSetData($tSCROLLINFO, "nPos", $TrackPos)
EndSwitch
;~ // Set the position and then retrieve it. Due to adjustments
;~ // by Windows it may not be the same as the value set.
DllStructSetData($tSCROLLINFO, "fMask", $SIF_POS)
_GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
_GUIScrollBars_GetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO)
;// If the position has changed, scroll the window and update it
$Pos = DllStructGetData($tSCROLLINFO, "nPos")
If ($Pos <> $yPos) Then
_GUIScrollBars_ScrollWindow($hWnd, 0, $yChar * ($yPos - $Pos))
$yPos = $Pos
EndIf
Return $GUI_RUNDEFMSG
[/autoit][autoit][/autoit][autoit]EndFunc ;==>WM_VSCROLL
[/autoit]