I found two "versions" of adding an IE control to a Gui.
Code:
pwb := COM_AtlAxGetControl(COM_AtlAxCreateContainer(WinExist(),0,0,600,400, "Shell.Explorer") )
which can place the control inside the window at specific size and coordinates
Code:
pweb := COM_AtlAxCreateControl(hGui, "Shell.Explorer")
pipa := COM_QueryInterface(pweb, "{00000117-0000-0000-C000-000000000046}")
which fills the entire Gui with the control
Only the second one however, responds to the tab/enter/delete/up/down keys with this:
Code:
WM_KEYDOWN(wParam, lParam, nMsg, hWnd)
{
; Critical 20
tooltip % wparam
;If (wParam = 0x09 || wParam = 0x0D || wParam = 0x2E || wParam = 0x26 || wParam = 0x28) ; tab enter delete up down
If (wParam = 9 || wParam = 13 || wParam = 46 || wParam = 38 || wParam = 40) ; tab enter delete up down
{
WinGetClass, Class, ahk_id %hWnd%
If (Class == "Internet Explorer_Server")
{
Global pipa
VarSetCapacity(Msg, 28)
NumPut(hWnd,Msg), NumPut(nMsg,Msg,4), NumPut(wParam,Msg,8), NumPut(lParam,Msg,12)
NumPut(A_EventInfo,Msg,16), NumPut(A_GuiX,Msg,20), NumPut(A_GuiY,Msg,24)
DllCall(NumGet(NumGet(1*pipa)+20), "Uint", pipa, "Uint", &Msg)
Return 0
}
}
}
The necessary "pipa" variable is absent from the first example, which is why it doesn't work.
Now my question is: how can I create an IE control with specific dimensions (example 1), but still be able to use the keys (example 2), or in other words: how do I receive the "pipa" variable in the first example?