Anzahl aller Child-windows eines Fensters auflisten...
Verfasst: 15.03.2007 22:06
HI, soweit hab ich mein Problem gelößt, aber ziemlich unelegant.
Schöner wäre es mit
Aber wie?
Ich hab versucht und versucht aber ich blick nicht durch und schaffs nicht... Bitte um Hilfe, danke!
Code: Alles auswählen
Procedure ListChildWindows (window, parameter)
*memory = ReAllocateMemory(*memory, 255)
GetClassName_ (window, *memory, 255)
class$ = PeekS (*memory) : FreeMemory (0)
SetGadgetText(1 , Str(Val(GetGadgetText(1))+1))
EnumChildWindows_ (window, @ListChildWindows (), 0)
ProcedureReturn #True
EndProcedure
Procedure ListWindows (window, parameter)
*memory = ReAllocateMemory(*memory, 255)
GetWindowText_ (window, *memory, 255)
title$ = PeekS (*memory)
If title$ = "VLC media player"
EnumChildWindows_ (window, @ListChildWindows (), 1)
EndIf
FreeMemory (0)
ProcedureReturn #True
EndProcedure
OpenWindow(0,x,y,110,30,#PB_Window_SystemMenu|#PB_Window_ScreenCentered,"Nummer")
CreateGadgetList(WindowID())
StringGadget(1,5,5,100,20,"")
EnumWindows_ (@ListWindows (), 0)
Repeat
EventID = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
Code: Alles auswählen
debug AnzahlChildWindows("Mein Fenster")





Ich hab versucht und versucht aber ich blick nicht durch und schaffs nicht... Bitte um Hilfe, danke!