NO

Author Topic: Enumerating child windows  (Read 3803 times)

Offline Vortex

  • Member
  • *
  • Posts: 867
    • http://www.vortex.masmcode.com
Enumerating child windows
« on: May 09, 2011, 08:14:58 PM »
Here is a quick example to enumerate child windows belonging to the desktop :

Code: [Select]
include     EnumChildWindows.inc

.data

f1          db 'Child window handle = %X , window title = %s',13,10,0

.data?

buffer      db 256 dup(?)

.code

start:

    invoke  GetDesktopWindow

    invoke  EnumChildWindows,eax,ADDR EnumChildWndProc,0

    invoke  ExitProcess,0
    

EnumChildWndProc PROC hwnd:DWORD,lParam:DWORD

    invoke  GetWindowText,hwnd,ADDR buffer,256

    invoke  printf,ADDR f1,hwnd,ADDR buffer

    mov     eax,1

    ret

EnumChildWndProc ENDP


END start
Code it... That's all...