Jump to content

GUI_DOCKHCENTER


grzesiek
 Share

Recommended Posts

Local $hGUI = GUICreate("", 150, 150, -1, -1, BitOR(0xC00000, 0x20000, 0x40000, 0x10000))

Local $cButton = GUICtrlCreateButton(" Button ", 0, 0)
GUICtrlSetResizing(-1, 802) ; GUI_DOCKALL

GUISetState()

WinMove($hGUI, "", Default, Default, 300, 300)

Local $aPos = ControlGetPos($hGUI, "", $cButton)
GUICtrlSetPos(-1, (300 - $aPos[2]) / 2, (270 - $aPos[3]) / 2)

GUICtrlSetResizing(-1, 8 + 128 + 768) ; GUI_DOCKHCENTER + GUI_DOCKVCENTER
;GUICtrlSetResizing(-1, 102) ; GUI_DOCKBORDERS

While Sleep(10000)
WEnd

When I change button resizing to GUI_DOCKHCENTER and GUI_DOCKVCENTER the button doesn't stay in the center, but when I change to GUI_DOCKBORDERS the button is correctly resized.

Edited by grzesiek
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...