| |
|
|
|
Source watts on the 15.07.2007 from the MMJ-Quellcodesammlung (Dietmar horn) in The Babyklappe on XProfan.Com stored:
Mainwindow: Handles all Kindfenster enumerate
PRFellow-Presentation
Author: Thomas Hölzer - any rights vorbehalten
2 routines, circa any Kindfenster one as Parameter
übergebenen %hwnd or Dialogs aufzuzählen
Please mind:
EnumAllActiveChildren ignoring unsichtbare and/or
not active (EnableWindow) Controls
Def GetWindow(2) !USER32,GetWindow
Def GetNextDlgGroupItem(3) !USER32,GetNextDlgGroupItem
Def IsWindow(1) !USER32,IsWindow
Proc EnumAllChildren
Parameters hparent&
Declare hc&,count%
Case Equ(IsWindow(hparent&),0): Return 0
Let hc&=GetWindow(hparent&,5)
Case Equ(IsWindow(hc&),0): Return 0
While Neq(hc&,0)
Inc count%
Print lever:,hc&
Let hc&=GetWindow(hc&,2)
Wend
Return count%
ENDPROC
Proc EnumAllActiveChildren
Parameters hparent&
Declare hc&,hfirst&,count%
Case Equ(IsWindow(hparent&),0): Return 0
Let hfirst&=GetNextDlgGroupItem(hparent&,0,0)
Let hc&=hfirst&
Case Equ(IsWindow(hc&),0): Return 0
While Neq(hc&,0)
Inc count%
Let hc&=GetNextDlgGroupItem(hparent&,hc&,0)
Print lever:,hc&
Case Equ(hc&,hfirst&): Let hc&=0
Wend
Return count%
ENDPROC
Cls
EnumAllChildren %desktop
WaitMouse
|
|
|
| |
|
|