MyEarth Posted November 28, 2014 Share Posted November 28, 2014 (edited) Hi, I don't know how is called ( EDIT: sizing grips ) so i'll make a screenshot: With Autoit Window Info is msctls_statusbar32, also SciTEWindow have it. But i see it also in a third-part software: In this case isn't a Status Bar and the information are: >>>> Control <<<< Class: ScrollBar Instance: 1 ClassnameNN: ScrollBar1 Name: Advanced (Class): [CLASS:ScrollBar; INSTANCE:1] Style: 0x54000018 ExStyle: 0x00000000 So is a scrollbar? But how to create it without using a Status Bar? Edited November 28, 2014 by MyEarth Link to comment Share on other sites More sharing options...
matwachich Posted November 28, 2014 Share Posted November 28, 2014 I maybe wrong but this is not a control, you just have to make your GUI resizable to have it! Link to comment Share on other sites More sharing options...
MyEarth Posted November 28, 2014 Author Share Posted November 28, 2014 You are wrong, make a resizable gui don't add that Link to comment Share on other sites More sharing options...
jguinch Posted November 28, 2014 Share Posted November 28, 2014 It seems to be part of the status bar, no ? Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
MyEarth Posted November 28, 2014 Author Share Posted November 28, 2014 (edited) No, there isn't any status bar in the second screenshot ( where you can see it? ) only that ScrollBar i'm sure of that and Autoit Window Info confirm. The status bas is in SciTe and Internet Explorer, just for make an example, but i'd like to know how that software has make that control without a status bar. Edited November 28, 2014 by MyEarth Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 28, 2014 Moderators Share Posted November 28, 2014 MyEarth,All I can find about these sizing grips is this thread which is not quite what you want, but pretty close. 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 Link to comment Share on other sites More sharing options...
MyEarth Posted November 28, 2014 Author Share Posted November 28, 2014 Melba, thanks for the suggestion. Is very close but not the same...if i don't find a solution i'll use that. Good to know is called "sizing grips" Link to comment Share on other sites More sharing options...
MyEarth Posted November 28, 2014 Author Share Posted November 28, 2014 (edited) Well, i have found an example on Vbforums for make the same size grip, without the status bar: The question is: Someone knows VB? SizeGrip.zip Edited November 28, 2014 by MyEarth Link to comment Share on other sites More sharing options...
MyEarth Posted November 28, 2014 Author Share Posted November 28, 2014 (edited) I'm near to the answer. Reading this post: You have to create a new child window with class name Scrollbar and control style SBS_SIZEGRIP Everything comes back! That's why that control is called "Scrollbar" The info at the page Scroll Bar Control Styles. We need to use CreateWindow ( in autoit i don't have find ) or CreateWindowEx ( in Autoit is called _WinAPI_CreateWindowEx ) with Class = Scrollbar and the $SBS_SIZEGRIP const, that doesn't exist in our UDF ( in theory is 0x10 because the original is Const SBS_SIZEGRIP = &H10 ) A little hand is appreciated EDIT: This are all the style from a spy tool of that "Scroolbar" control: WS_OVERLAPPED WS_CLIPSIBLINGS WS_VISIBLE WS_CHILD SBS_HORZ SBS_SIZEBOX SBS_SIZEGRIP Edited November 28, 2014 by MyEarth Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted November 28, 2014 Moderators Share Posted November 28, 2014 MyEarth,I have got the resizing to work: expandcollapse popup#include<GUIConstantsEx.au3> #include<WindowsConstants.au3> #include <WinAPI.au3> Global $hGUI = GUICreate("Sizetest", Default, Default, Default, Default, $WS_SIZEBOX) GUISetState() GUIRegisterMsg($WM_PAINT, "_WM_PAINT") GUIRegisterMsg($WM_NCHITTEST, "_WM_NCHITTEST") $aPos = WinGetPos($hGUI) WinMove($hGUI, "", $aPos[0], $aPos[1], $aPos[2] + 1, $aPos[3]) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_PAINT($hWnd, $uMsg, $wParam, $lParam) ; Init paint Local $tPS = DllStructCreate("ptr hdc; BOOL fErase;long rcPaint[4]; BOOL fRestore; BOOL fIncUpdate; BYTE rgbReserved[32];") Local $aPaint = DllCall("user32.dll", "handle", "BeginPaint", "hwnd", $hWnd, "ptr", DllStructGetPtr($tPS)) If @error Then Return $GUI_RUNDEFMSG Local $hDC = $aPaint[0] ; Draw size grip Local $aPos = WinGetClientSize($hWnd) DrawFrameControl($hDC, $aPos[0] - 25, $aPos[1] - 25, $aPos[0], $aPos[1]) ; Finish Paint DllCall("user32.dll", "bool", "EndPaint", "hwnd", $hWnd, "ptr", $aPaint[2]) Return $GUI_RUNDEFMSG EndFunc ;==>_WM_PAINT Func DrawFrameControl($hDC, $nLeft, $nTop, $nRight, $nBottom) Local Const $DFC_SCROLL = 3, $DFCS_SCROLLSIZEGRIP = 8 Local $stRect = DllStructCreate("int;int;int;int") DllStructSetData($stRect, 1, $nLeft) DllStructSetData($stRect, 2, $nTop) DllStructSetData($stRect, 3, $nRight) DllStructSetData($stRect, 4, $nBottom) DllCall("user32.dll", "int", "DrawFrameControl", "hwnd", $hDC, "ptr", DllStructGetPtr($stRect), "int", $DFC_SCROLL, "int", $DFCS_SCROLLSIZEGRIP) EndFunc ;==>DrawFrameControl Func _WM_NCHITTEST($hWnd, $uMsg, $wParam, $lParam) Switch $hWnd Case $hGUI Local $iXPos = _WinAPI_LoWord($lParam) Local $iYPos = _WinAPI_HiWord($lParam) Local $aPos = WinGetPos($hWnd) Local $aClient = WinGetClientSize($hWnd) Local $iBorder = ($aPos[2] - $aClient[0]) / 2 If ($iXPos > $aPos[0] + $aPos[2] - 25 - $iBorder) And ($iYPos > $aPos[1] + $aPos[3] - 25 - $iBorder) Then Return $HTBOTTOMRIGHT EndIf EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>_WM_NCHITTESTNow to get the cursor to change as well. 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 Link to comment Share on other sites More sharing options...
LarsJ Posted November 28, 2014 Share Posted November 28, 2014 What about this: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> Opt( "WinWaitDelay", 0 ) Opt( "MustDeclareVars", 1 ) Global $hGui, $hDots Example() Func Example() $hGui = GUICreate( "Drag dots", 300, 200, -1, 300, $WS_OVERLAPPEDWINDOW ) $hDots = CreateDragDots( $hGui ) GUIRegisterMsg( $WM_SIZE, "WM_SIZE" ) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete( $hGui ) Exit EndFunc Func CreateDragDots( $hGui ) Local $aCall = DllCall( "user32.dll", "hwnd", "CreateWindowExW", _ "dword", 0, _ "wstr", "Scrollbar", _ "ptr", 0, _ "dword", 0x50000018, _ ; $WS_CHILD|$WS_VISIBLE|$SBS_SIZEBOX|$SBS_SIZEBOXOWNERDRAWFIXED "int", 0, _ "int", 0, _ "int", 17, _ ; Width "int", 17, _ ; Height "hwnd", $hGui, _ "hwnd", 0, _ "hwnd", 0, _ "int", 0 ) If @error Or Not $aCall[0] Then Return SetError(1, 0, 0) Return $aCall[0] EndFunc Func WM_SIZE( $hWnd, $iMsg, $wParam, $lParam ) #forceref $iMsg Local $aClientSize[2] = [ BitAND( $lParam, 65535 ), BitShift( $lParam, 16 ) ] If $hWnd = $hGui Then Switch $wParam Case 0 WinMove( $hDots, 0, $aClientSize[0] - 17, $aClientSize[1] - 17 ) WinSetState( $hDots, 0, @SW_RESTORE ) Case 2; SIZE_MAXIMIZED WinSetState( $hDots, 0, @SW_HIDE ) EndSwitch EndIf EndFunc Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions Link to comment Share on other sites More sharing options...
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