How to enumerate all window handles
Fills one ListBox with all window handles, titles, and classes. Fills another with
any windows not found in the original. Useful for searching out all the windows used
by a specific application. Just fill the base, run your program, then find the new ones.
Uses the following API function and messages:
- EnumWindows
- EnumChildWindows
- GetClassName
- GetWindowLong
- GetWindowText
- SendMessage
- LB_FINDSTRING
- WM_GETTEXT
- WM_CLOSE
Back to Code Samples
Copyright © 2000 by Matt E. Hart, All Rights Reserved Worldwide.
Nothing on this web site may be reproduced, in any form, without express written consent.