//QM v2.8. Do not edit with text editor!!! //
4     6
Y%G|ϊ3es z[&Lf
  GetWindowList2  8 308AA242 0
 /
function str&names [$exe] [flags] [*pCallbackFunction] [lParam] [ARRAY(int)&handles] ;;flags: 1 exclude hidden, 2 exclude without name, 4 exclude popup, 8 exclude non-popup.

 names - str variable that receives list of window names. Can be 0.
 exe - name of program. If omitted, 0 or "", all programs.
 pCallbackFunction - address of window enumeration callback function.
   Callback function type must be function# hWnd lParam str&wintext str&winclass
   Callback function must return 1 to continue enumeration, or 0 to stop.
 lParam - some value to pass to the callback function.
 handles - receives window handles.


type __GWL2 str*names flags *pCallbackFunction lParam ARRAY(int)*handles str'ts str'cs
__GWL2 g
if(&names)
	g.names=&names
	int sflags=names.flags ;;save names flags
	g.names.flags=3
g.flags=flags
memcpy &g.flags &flags 16
g.ts.all(300); g.ts.flags=1
g.cs.all(100); g.cs.flags=1

opt hidden !(g.flags&1)
win "" "" exe flags&12|0x8000 &GWL_EnumProc2 &g

if(&names) names.flags=sflags ;;restore names flags

  GWL_EnumProc2  8 308AA24F 0
 /
function# hWnd __GWL2&g

g.ts.getwintext(hWnd)
g.cs.getwinclass(hWnd)
if(!g.ts.len) if(g.flags&2) ret 1; else if(g.names) g.ts.from("+" g.cs)

if(g.names) *g.names+g.ts; *g.names+"[]"
if(g.handles) ARRAY(int)& ha=g.handles; ha[ha.redim(-1)]=hWnd

if(g.pCallbackFunction and g.pCallbackFunction > 0xffffU)
	ret call(g.pCallbackFunction hWnd g.lParam &g.ts &g.cs)

ret 1
  file  268500992 0

  