Aaron3569 Posted May 19, 2021 Posted May 19, 2021 Hello, is it possible to make a child guy acting like a GuiControl when scrolling the parent window? the way i am trying it makes the child gui dissapear when moving or minimizing the parent window. Thanks in advance. 👍 expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiScrollBars.au3> HotKeySet("{RIGHT}", "ScrollRight") HotKeySet("{LEFT}", "ScrollLeft") $hParent = GUICreate("Parent", 1300, 800, -1, -1) GUICtrlCreateButton("Button", 150, 150, 150, 50) GUISetState() $hChild = GUICreate("Child", 100, 100, -1,-1, $WS_CHILD , $WS_EX_MDICHILD, $hParent) GUISetBkColor(0x000000) GUISetState() _GUIScrollBars_Init($hParent, 10000) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd Func ScrollRight() _GUIScrollBars_SetScrollInfoPos($hParent, $SB_HORZ, _GUIScrollBars_GetScrollInfoPos($hParent, $SB_HORZ) + 5) EndFunc Func ScrollLeft() _GUIScrollBars_SetScrollInfoPos($hParent, $SB_HORZ, _GUIScrollBars_GetScrollInfoPos($hParent, $SB_HORZ) - 5) EndFunc
pixelsearch Posted May 19, 2021 Posted May 19, 2021 HiAaron, You shouldn't use at same time $WS_CHILD and $WS_EX_MDICHILD Have you tried it like this ? $hChild = GUICreate("Child", 100, 100, -1,-1, $WS_CHILD , -1, $hParent) Aaron3569 1 "I think you are searching a bug where there is no bug..."
Aaron3569 Posted May 19, 2021 Author Posted May 19, 2021 1 hour ago, pixelsearch said: HiAaron, You shouldn't use at same time $WS_CHILD and $WS_EX_MDICHILD Have you tried it like this ? $hChild = GUICreate("Child", 100, 100, -1,-1, $WS_CHILD , -1, $hParent) Thank you , it works now! 😄
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now