If changed to the below then it can be interacted with using the mouse but it is drawn wrong.
Code: Select all
#Include %A_ScriptDir%\..\GridGUI.ahk
myGui := new GridGUI("Grid Test", "resize")
myGui.GuiClose := GridGUI.ExitApp
oWB := myGui.Add(3, "2-3", "ActiveX", "w113 h43", "shell explorer").vVar
oWB.Navigate("about:<!DOCTYPE HTML><html><body style=""{margin:0;}""><img src=""https://i.imgur.com/FlGrIY3.gif""></body></html>")
oWB.document.body.style.overflow := "hidden"
myGui.Add("1-3", 1, "Edit", , , 1, , 1)
myGui.Add(1, 2, "Button", , "Button")
myGui.Add(2, 2, "Edit", "w0", , 1, 1, 1)
myGui.Add(1, 3, "Button", , "Button")
myGui.Add(2, "3-4", "Button", , "Button Button", , 1)
myGui.Add("1-3", 5, "Button", , "Button", 1, , 1)
ctrl := myGui.Add("1-3", "1-5", "Picture", "w0 h0", "Images\background.png", , , 1, 1)
myGui.Show()
return
Edit: it seems to be related to my lib as when I try to reproduce it without it then I get no issue with mouse input
Edit 2: If I add the picture the normal way that is using the Gui command instead of using my lib then it works without problem, I wonder what I am doing wrong.
Edit 3: It is odd, I don't think that my lib does anything to the controls besides calling GuiControl, MoveDraw with some calculated positions and sizes in the order that the controls were added, although it does this each time the GUI is resized.
Edit 4: Could it be due to the OnMessage callbacks that I set up, I am using WM_SIZE, WM_MOVE, WM_ACTIVATE, WM_CONTEXTMENU, WM_SYSCOMMAND and WM_DROPFILES.
Edit 5: It seems to not be connected to the OnMessage callbacks.
Edit 6: I have implemented a workaround but the core issue is still unknown to me. The workaround involves registering the controls that should be shown ontop of the background control and drawing them later a second time like was done in the link I mentioned.