FireFox Posted May 7, 2011 Posted May 7, 2011 Hi,I will explain my problem with some images because I don't know how to do it with words...At start I have this :If I resize the GUI with the function WM_SIZE, the controls resizes according to their resize parameters (given with GUICtrlSetResizing)But if I move down the scrollbar and I resize the GUI, the controls will stuck at the "new" top of the window :The problem is solved with the function WM_SIZE but when I resize the GUI, the controls are stuck to the top left and don't resize...Here is my WM_SIZE function : Func WM_SIZE($hWnd, $Msg, $wParam, $lParam) #forceref $Msg, $wParam Local $index = -1, $yChar, $xChar, $xClientMax, $xClient, $yClient, $ivMax For $x = 0 To UBound($aSB_WindowInfo) - 1 If $aSB_WindowInfo[$x][0] = $hWnd Then $index = $x $xClientMax = $aSB_WindowInfo[$index][1] $xChar = $aSB_WindowInfo[$index][2] $yChar = $aSB_WindowInfo[$index][3] $ivMax = $aSB_WindowInfo[$index][7] ExitLoop EndIf Next If $index = -1 Then Return 0 ; Retrieve the dimensions of the client area. $xClient = BitAND($lParam, 0x0000FFFF) $yClient = BitShift($lParam, 16) $aSB_WindowInfo[$index][4] = $xClient $aSB_WindowInfo[$index][5] = $yClient Local $tSCROLLINFO = _GUIScrollBars_GetScrollInfoEx($hWnd, $SB_VERT) DllStructSetData($tSCROLLINFO, "nPos", 0) _GUIScrollBars_SetScrollInfo($hWnd, $SB_VERT, $tSCROLLINFO) Return $GUI_RUNDEFMSG EndFunc ;==>WM_SIZESo I'm wondering if it's possible to edit the WM_SIZE function to solve this issue.Br, FireFox.
Moderators Melba23 Posted May 7, 2011 Moderators Posted May 7, 2011 FireFox,I did some work recently which you can see here on getting controls to behave when resizing GUIs with scrollbars that were not at the top left - it might help. It is based on my Scrollbars UDF although it should not be difficult to amend it for the "normal" GUIScrollbar UDF. Please let me know if you have problems as I am still working on it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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