EnumChildWindows() help.
Posted: Sun Oct 23, 2011 7:46 pm
I expected this code to return 2 titles -- the child window ("Child") and the messagebox.
instead, it returns none.
instead, it returns none.
Code: Select all
Procedure.l EnumProcedure(WindowHandle.l, Parameter.l)
Protected cTitle.s = Space(200)
GetWindowText_(WindowHandle, @cTitle, 200)
If Len(Trim(cTitle))>0
Debug Trim(cTitle)
EndIf
ProcedureReturn #True ; Keep enumerating
EndProcedure
Procedure test(n)
Delay(1000) ; just wait for msgbox to display
Debug "Enumerating child windows"
EnumChildWindows_(WindowID(0),@EnumProcedure(), 0)
EndProcedure
OpenWindow(0,0,0,10,10,"Parent")
OpenWindow(1,10,10,20,20,"Child",0,WindowID(0))
CreateThread(@test(),0)
MessageBox_(WindowID(1),"test","test",0)