Jump to content

Non-Resizable GUI keeps getting resized anyway!


Mbee
 Share

Recommended Posts

Although my main GUI window is set up to be non-resizable, I keep getting unexpected and unwanted $WM_SIZE messages and the ostensibly non-resizable window gets inexplicably resized anyway if I move the main GUI window on the screen.

Please note: I realize that everyone wants me to post a fully repeatable set of code to examine or try themselves, but that would mean posting over 5,000 lines of code (assuming only my main app and no subsidiary code)!  Forgive me, but that's just not practical and I'm not going to try. If you prefer not to assist me without my posting all that, I will completely understand...
 

The main GUI code is using On Event Mode, and the main GUI Window is created as follows:

Global $G_Project7GUI = GUICreate("Project7 0.99.3",818,845,-1,-1,BitOr($WS_CAPTION,$WS_SYSMENU,$WS_OVERLAPPED,$WS_VISIBLE),BitOr($WS_EX_ACCEPTFILES,$WS_EX_APPWINDOW))
GUISetOnEvent($GUI_EVENT_CLOSE, "GUIWinClose", $G_Project7GUI)
GUISetOnEvent($GUI_EVENT_DROPPED, "GUIPicDropped", $G_Project7GUI)

I have never previously explicitly registered a $WM_SIZE handler (or indeed any other message for that matter). but in order to try to troubleshoot this curious behavior, I called GUIRegisterMsg() to handle the following messages: $WM_PAINT, $WM_NCPAINT, $WM_SIZING, $WM_SIZE, $WM_MOVE, $WM_WINDOWPOSCHANGED, and $WM_CHANGEUISTATE - none of which I normally have registered.

An extremely important factor to note is that the main GUI never inexplicably resizes (and I never get any $WM_SIZE messages) until after I setup a context menu and four context menu items (and then I move the main GUI slightly). Here is the code where I setup this context menu...

Func _MyInitContextMenus()

    Local $Lf_MenItmAID, $Lf_MenItmBID, $Lf_MenItmCID, $Lf_MenItmDID
;
    Const $Cn_CtxMenuItemADef = "Alpha"
    Const $Cn_CtxMenuItemBDef = "Beta"
    Const $Cn_CtxMenuItemCDef = "Delta"
    Const $Cn_CtxMenuItemDDef = "Gamma"
;
    $G_CtxMenuInfoAra[1][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu( $Gc_BtnID1 )
    $G_CtxMenuInfoAra[2][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu( $Gc_BtnID2 )
    $G_CtxMenuInfoAra[3][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu( $Gc_BtnID3 )
    $G_CtxMenuInfoAra[4][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu( $Gc_BtnID4 )
    $G_CtxMenuInfoAra[5][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu( $Gc_BtnID5 )
    $G_CtxMenuInfoAra[6][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu( $Gc_BtnID6 )
;
    For $i = 1 To $G_CtxMenuInfoAraNumRows -1

        $Lf_MenItmAID = GUICtrlCreateMenuItem( $Cn_CtxMenuItemADef, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx] )
        $Lf_MenItmBID = GUICtrlCreateMenuItem( $Cn_CtxMenuItemBDef, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx] )
        $Lf_MenItmCID = GUICtrlCreateMenuItem( $Cn_CtxMenuItemCDef, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx] )
        $Lf_MenItmDID = GUICtrlCreateMenuItem( $Cn_CtxMenuItemDDef, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx] )

        Local $Lf_MenItmEmbAra[$Cn_MenuItemEmbAraNumElems] = [ $Lf_MenItmAID, $Lf_MenItmBID, _
                                                               $Lf_MenItmCID, $Lf_MenItmDID ]
        $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraItemAraIx] = $Lf_MenItmEmbAra

        For $j = 0 To $Cn_MenuItemEmbAraNumElems -1
            GUICtrlSetState( $Lf_MenItmEmbAra[$j], BitOr($GUI_SHOW,$GUI_DISABLE) )
            GUICtrlSetOnEvent( $Lf_MenItmEmbAra[$j], "_MyContextMenuItemHandler" )
        Next
    Next

    Return
EndFunc

These context menu items are not enabled until required, which is why you see the $GUI_DISABLE call.

And here is the Context Menu Handler code:

Func _MyContextMenuItemHandler()
    Local $Lf_SlotNum, $Lf_CtxMenuItemCtrlID, $Lf_EmbAraPtr, $Lf_ItemNum

    $Lf_CtxMenuItemCtrlID = @GUI_CtrlId

    $Lf_SlotNum = 0
    $Lf_ItemNum = -1
    For $i = 1 To $G_CtxMenuInfoAraNumRows
        $Lf_EmbAraPtr = $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraItemAraIx]
        For $j = 0 To $Cn_MenuItemEmbAraNumElems -1
            If $Lf_CtxMenuItemCtrlID = ($Lf_EmbAraPtr)[$j] Then
                $Lf_SlotNum = $i
                $Lf_ItemNum = $j
                ExitLoop 2
            EndIf
        Next
    Next
;
    Switch $Lf_ItemNum
        Case $Cn_MenuItemEmbAraActionAIx
            _ProcessA( $Lf_SlotNum )

        Case $Cn_MenuItemEmbAraActionBIx
            _ProcessB( $Lf_SlotNum )

        Case $Cn_MenuItemEmbAraActionCIx
            _ProcessC( $Lf_SlotNum )

        Case $Cn_MenuItemEmbAraActionDIx
            _ProcessD( $Lf_SlotNum )
    EndSwitch
;
    Return
EndFunc

 

I've setup a log file to record the registered messages coming in.  What follows are the messages that arrive after the context menus are setup and enabled and I move the main GUI just a bit...

_DebugMsgHandler Got Msg: $WM_NCPAINT Wparam= 0x00000001, LParam= 0x00000000
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x006603BB
_DebugMsgHandler Got Msg: $WM_SIZE - New Width = 394, New Height = 272 Wparam= 0x00000000, LParam= 0x0110018A
_DebugMsgHandler Got Msg: $WM_PAINT Wparam= 0x00000000, LParam= 0x00000000
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005B03B1
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03AF
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005803AB
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005803AA
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005703A8
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005703A7
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03A8
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03AA
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03AB
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03AC
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03AD
_DebugMsgHandler Got Msg: $WM_WINDOWPOSCHANGED Wparam= 0x00000000, LParam= 0x008CF050
_DebugMsgHandler Got Msg: $WM_MOVE Wparam= 0x00000000, LParam= 0x005A03AE
MyGUIWinClose invoked
Cleaning up and exiting

 

The "new" width & height that the $WM_SIZE message provided correspond to nothing in my app anywhere at all. I occasionally pop-up one or another sub-GUIs under certain circumstances, but they both have very different sizes than that.

Note also that absolutely none of the context menus or context menu items have ever been invoked when this happens, so I can't begin to understand why they have anything at all to do with the main GUI being resized. To repeat, all I know is that the bizarre resizing never happens until the context menu and items are setup and enabled and I then slightly move the main GUI window.

Can anyone help me understand why this very bizarre resizing behavior is happening?

Thanks!

 

 

Edited by Mbee
Link to comment
Share on other sites

  • Moderators

Mbee,

I have joined up all those bits and for me it works as expected with no WM_SIZE messages being received at any time:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Opt("GUIOnEventMode", 1)

Global $G_CtxMenuInfoAra[7][3]
Global $Cn_MenuItemEmbAraNumElems = 4
Global $G_CtxMenuInfoAraNumRows = 7
Global $Cn_CtxMenuInfoAraMainCtxIdIx = 1
Global $Cn_CtxMenuInfoAraItemAraIx = 2

Global $Cn_MenuItemEmbAraActionAIx = 0
Global $Cn_MenuItemEmbAraActionBIx = 1
Global $Cn_MenuItemEmbAraActionCIx = 2
Global $Cn_MenuItemEmbAraActionDIx = 3

$G_Project7GUI = GUICreate("Project7 0.99.3", 818, 845, -1, -1, BitOR($WS_CAPTION, $WS_SYSMENU, $WS_OVERLAPPED, $WS_VISIBLE), BitOR($WS_EX_ACCEPTFILES, $WS_EX_APPWINDOW))
GUISetOnEvent($GUI_EVENT_CLOSE, "GUIWinClose", $G_Project7GUI)
GUISetOnEvent($GUI_EVENT_DROPPED, "GUIPicDropped", $G_Project7GUI)

$Gc_BtnID1 = GUICtrlCreateButton("1 && Enable", 10, 10, 80, 30)
GUICtrlSetOnEvent($Gc_BtnID1, "_Enable_Menus")
$Gc_BtnID2 = GUICtrlCreateButton("2", 10, 60, 80, 30)
$Gc_BtnID3 = GUICtrlCreateButton("3", 10, 110, 80, 30)
$Gc_BtnID4 = GUICtrlCreateButton("4", 10, 160, 80, 30)
$Gc_BtnID5 = GUICtrlCreateButton("5", 10, 210, 80, 30)
$Gc_BtnID6 = GUICtrlCreateButton("6", 10, 260, 80, 30)

GUISetState()

_MyInitContextMenus()

GUIRegisterMsg($WM_SIZE, "_WM_SIZE")

While 1
    Sleep(10)
WEnd

Func GUIWinClose()
    Exit
EndFunc

Func GUIPicDropped()

EndFunc

Func _WM_SIZE($hWnd, $iMsg, $wParam, $lParam)
    ConsoleWrite("Window resized" & @CRLF)
EndFunc

Func _Enable_Menus()
    For $i = 1 To $G_CtxMenuInfoAraNumRows - 1
        $Lf_MenItmEmbAra = $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraItemAraIx]
        For $j = 0 To $Cn_MenuItemEmbAraNumElems - 1
            GUICtrlSetState($Lf_MenItmEmbAra[$j], $GUI_ENABLE)
        Next
    Next
EndFunc

Func _MyContextMenuItemHandler()
    Local $Lf_SlotNum, $Lf_CtxMenuItemCtrlID, $Lf_EmbAraPtr, $Lf_ItemNum

    $Lf_CtxMenuItemCtrlID = @GUI_CtrlId

    $Lf_SlotNum = 0
    $Lf_ItemNum = -1
    For $i = 1 To $G_CtxMenuInfoAraNumRows
        $Lf_EmbAraPtr = $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraItemAraIx]
        For $j = 0 To $Cn_MenuItemEmbAraNumElems -1
            If $Lf_CtxMenuItemCtrlID = ($Lf_EmbAraPtr)[$j] Then
                $Lf_SlotNum = $i
                $Lf_ItemNum = $j
                ExitLoop 2
            EndIf
        Next
    Next
;
    Switch $Lf_ItemNum
        Case $Cn_MenuItemEmbAraActionAIx
            ConsoleWrite("Alpha from " & $Lf_SlotNum & @CRLF) ; _ProcessA( $Lf_SlotNum )

        Case $Cn_MenuItemEmbAraActionBIx
            ConsoleWrite("Beta from " & $Lf_SlotNum & @CRLF) ; _ProcessB( $Lf_SlotNum )

        Case $Cn_MenuItemEmbAraActionCIx
            ConsoleWrite("Delta from " & $Lf_SlotNum & @CRLF) ; _ProcessC( $Lf_SlotNum )

        Case $Cn_MenuItemEmbAraActionDIx
            ConsoleWrite("Gamma from " & $Lf_SlotNum & @CRLF) ; _ProcessD( $Lf_SlotNum )
    EndSwitch
;
    Return
EndFunc

Func _MyInitContextMenus()

    Local $Lf_MenItmAID, $Lf_MenItmBID, $Lf_MenItmCID, $Lf_MenItmDID
    ;
    Const $Cn_CtxMenuItemADef = "Alpha"
    Const $Cn_CtxMenuItemBDef = "Beta"
    Const $Cn_CtxMenuItemCDef = "Delta"
    Const $Cn_CtxMenuItemDDef = "Gamma"

    ;
    $G_CtxMenuInfoAra[1][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu($Gc_BtnID1)
    $G_CtxMenuInfoAra[2][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu($Gc_BtnID2)
    $G_CtxMenuInfoAra[3][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu($Gc_BtnID3)
    $G_CtxMenuInfoAra[4][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu($Gc_BtnID4)
    $G_CtxMenuInfoAra[5][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu($Gc_BtnID5)
    $G_CtxMenuInfoAra[6][$Cn_CtxMenuInfoAraMainCtxIdIx] = GUICtrlCreateContextMenu($Gc_BtnID6)
    ;
    For $i = 1 To $G_CtxMenuInfoAraNumRows - 1

        $Lf_MenItmAID = GUICtrlCreateMenuItem($Cn_CtxMenuItemADef & "_" &  $i, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx])
        $Lf_MenItmBID = GUICtrlCreateMenuItem($Cn_CtxMenuItemBDef & "_" &  $i, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx])
        $Lf_MenItmCID = GUICtrlCreateMenuItem($Cn_CtxMenuItemCDef & "_" &  $i, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx])
        $Lf_MenItmDID = GUICtrlCreateMenuItem($Cn_CtxMenuItemDDef & "_" &  $i, $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraMainCtxIdIx])

        Local $Lf_MenItmEmbAra[$Cn_MenuItemEmbAraNumElems] = [$Lf_MenItmAID, $Lf_MenItmBID, _
                $Lf_MenItmCID, $Lf_MenItmDID]
        $G_CtxMenuInfoAra[$i][$Cn_CtxMenuInfoAraItemAraIx] = $Lf_MenItmEmbAra

        For $j = 0 To $Cn_MenuItemEmbAraNumElems - 1
            ;GUICtrlSetState($Lf_MenItmEmbAra[$j], BitOR($GUI_SHOW, $GUI_DISABLE))
            GUICtrlSetState($Lf_MenItmEmbAra[$j], $GUI_DISABLE)
            GUICtrlSetOnEvent($Lf_MenItmEmbAra[$j], "_MyContextMenuItemHandler")
        Next
    Next

    Return
EndFunc   ;==>_MyInitContextMenus

So I suggest that the problem lies somewhere else in your code.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

@Mbee, i encountered this issue only on Windows 10 with the "Snap" feature turned OFF. here is the UDF to workaround this:

 

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

@Melba23, thanks for your reply and the work you did to try to reproduce the problem.

Yes, surely the problem lies elsewhere, but no matter what I try, I can't find the source of the problem. I've tried the usual debugging tactics, such as commenting out large segments of code in various places and inserting Return statements immediately upon function entry points. I've always had debug message code interspersed throughout the code (I removed them from the snippets I posted above), but there is not the slightest indication of an error and nothing at all related to resizing any window under any circumstances. I've tried using the graphical debugger, but the thing is, the resize definitely occurs asynchronously and external to anything at all in my code anywhere at all, so the debugger can't intercept it or even see that it occurs.

To my admittedly limited knowledge, the ONLY way to resize a window internally in an AutoIt app is to call WinMove(), and I've used two different file search tools to search every single .au3 file anywhere in my project (including third-party UDFs) for any occurrence of WinMove, and it absolutely is NOT anywhere to be found!

So how on this side of the galaxy can there be any way at all to resize my GUI window? It seems completely impossible! It's as if something completely external from my code is issuing the order to resize, but that seems highly improbable.

Can you (or anyone else, of course) suggest any way of determining how and where the resize order is coming from?  Or perhaps a way of intercepting the resize message so that I can ignore it?  I've looked through the entire list of "$WM_" message codes to try to find one that is sent to initiate the resize, but I can't find such.  From what I understand, $WM_SIZE & $WM_SIZING are sent only after the order to resize the window has already been sent.

I am in desperate need of assistance with this!

Thanks

Link to comment
Share on other sites

In a further attempt to discover the source of the resize order, or at least prevent a resize, I registered a $WM_GETMINMAXINFO message handler. This message is sent prior to any resize operation, so this must be invoked for any attempt to resize the window.

I've coded this handler to simply force all the size elements in the MinMax struct to the fixed size values originally used to create the main GUI window. As such, it should be quite impossible for anything whatsoever to change the size of the window.

Yet it gets resized anyway!

Here's the MinMax handler:

Func _MyMinMaxHandler( $hWndGUI, $MsgID, $WParam, $LParam )
    #forceref $hWndGUI, $MsgID, $WParam, $LParam

    If $hWndGUI = $G_Project7GUI Then
        _MyUpdStatusMsg("_MySetMinMaxHandler Handler from $Project7GUI Invoked")
        Local $tMINMAXINFO = DllStructCreate("int[2];" & _
                "int MaxSize[2];" & _
                "int MaxPosition[2];" & _
                "int MinTrackSize[2];" & _
                "int MaxTrackSize[2]", _
                $LParam)

        DllStructSetData($tMINMAXINFO, "MaxSize", $Cn_TotalGUIWidth, 1 )
        DllStructSetData($tMINMAXINFO, "MaxSize", $Cn_TotalGUIHeight, 2 )

        DllStructSetData($tMINMAXINFO, "MinTrackSize", $Cn_TotalGUIWidth, 1)
        DllStructSetData($tMINMAXINFO, "MinTrackSize", $Cn_TotalGUIHeight, 2)

        DllStructSetData($tMINMAXINFO, "MaxTrackSize", $Cn_TotalGUIWidth, 1)
        DllStructSetData($tMINMAXINFO, "MaxTrackSize", $Cn_TotalGUIHeight, 2)
    Else
        _MyUpdStatusMsg("_MySetMinMaxHandler Handler from some OTHER GUI invoked!!!")
    EndIf
EndFunc   ;==>_MyMinMaxHandler

What kind of sorcery is overriding this MinMax handler and forcing a resize anyway?

 

Link to comment
Share on other sites

  • Moderators

Mbee,

The only way we can really help is if you post your entire script so that we can examine it in detail - as proved above, mere snippets are not going to be enough. By all means PM me the code if you do not want to make it public - as long as it is legal by forum standards I will happily take a look to see if I can see anything in it which might explain what you are seeing.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

My immense and eternal gratitude is yours squared, @Melba23!!  :drool:  I'll zip the whole project up and send it by PM (or perhaps a link to it from a file upload site).

My admittedly not-very-well-founded suspicion is that perhaps something in some UDFs from trancexx might be at play here (most likely due to the fact that I'm using it in some way that trancexx did not intend or anticipate), and primarily because that code is so dense, enigmatic and cryptic that it passeth all my understanding.  Also because in trancexx's example code for using her GIFAnimation UDF, it also registers a $WM_GETMINMAXINFO handler, which inexplicably forces a resize of at least some portion of the GUI to fixed, hard-coded values 500 x 350. (Though I've long ago commented out both the registermsg and that handler).

By the way, yes the code is fully legal and in compliance (no hacking or other despicable purpose), but I prefer to keep it private because I'm hoping one day to be able to sell it to supplement my meager disability income...

I'll get it all ready now...

Link to comment
Share on other sites

  • Moderators

Mbee,

I have already explained the problem in detail via PM, but for others reading the problem with the code you sent me was the _CustomInputBox UDF which was also registering the WM_GETMINMAXINFO message to limit the size of the UDF dialog. Very poor coding practice on the part of the UDF author resulted in the message subsequently being applied to ALL GUIs within the script - hence the resizing of the main GUI as soon as Windows received any form of RESIZEMOVE message from it.

A salutary lesson to all UDF writers - you MUST make sure that your code does not adversely affect the script which calls the UDF.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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...