How to retrieve window handles without subclassing
Fills a ListBox with top level parent window handles and titles. Another ListBox
is filled with all window handles and titles. Also show how to terminate a process.
Uses the following API functions:
- CloseHandle
- GetDesktopWindow
- GetParent
- GetWindow
- GetWindowText
- GetWindowThreadProcessId
- OpenProcess
- TerminateProcess
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.