Page 1 of 1
Getting list of child windows?
Posted: Sat Jun 18, 2011 12:20 am
by jassing
I have a container, that contains an object, with it's own handle.
IF the child handle is unknown, is there a way to get the container's list of child windows?
thanks.
-j
Re: Getting list of child windows?
Posted: Sat Jun 18, 2011 1:33 am
by netmaestro
Code: Select all
Structure Windowstuff
text.s
classname.s
hwnd.l
ctrlID.l
EndStructure
Global NewList windowstuff.Windowstuff()
Procedure EnumChildProc(hwnd, lParam)
Protected classname$ = Space(#MAX_PATH)
Protected windowname$ = Space(#MAX_PATH)
AddElement(windowstuff())
With windowstuff()
GetClassName_(hwnd, @classname$, #MAX_PATH-1) : \classname = classname$
GetWindowText_(hwnd, @windowname$, #MAX_PATH-1) : \text = windowname$
\hwnd = hwnd
\ctrlID = GetDlgCtrlID_(hwnd)
EndWith
ProcedureReturn #True
EndProcedure
EnumChildWindows_(hwndParent, @EnumChildProc(), 0)
ForEach windowstuff()
Debug windowstuff()\text
Debug windowstuff()\classname
Debug windowstuff()\hwnd
Debug windowstuff()\ctrlID
Next
Use GadgetID(<container>) in place of hwndParent and bob's your uncle.
Re: Getting list of child windows?
Posted: Sat Jun 18, 2011 2:23 am
by jassing
T*H*A*N*K Y*O*U !!!!!