Is control count limit hardcoded into ahk?
Posted: 06 Jan 2018, 02:51
doing some testing to optimize some code, using the following example:
I'd expect to never reach the "Too many controls" error message since the controls are properly destroyed, but I do at 11K; I'm guessing there is an internal counter that isn't getting updated?
Is there a way to de-increment this counter?
I tried Gui, %Static1Hwnd%: Destroy, but that gives "Invalid gui name".
Code: Select all
#SingleInstance, force
#Persistent
DetectHiddenWindows, On
Gui, New, +HwndNotify_Window,
Gui, %Notify_Window%: Add, Text, +HwndStatic1Hwnd Right, "Hello World"
HwndCount := 1
Loop {
DllCall("User32\DestroyWindow", "UInt", Static1Hwnd)
Gui, %Notify_Window%: Add, Text, X5 Y5 +HwndStatic1Hwnd Right, "Hello World"
HwndCount++
ToolTip, %HwndCount%
Sleep, -1
}
return
Is there a way to de-increment this counter?
I tried Gui, %Static1Hwnd%: Destroy, but that gives "Invalid gui name".