How can I know if a window belongs to my program? I guess I can use the window handle to get the executable name but that seems like a lot of work and I have to do this repeatedly so I think it might be a performance issue. Is there a simple way to know if a given window handle is from ones own program with win32 or some OS construct? Can't use window titles either due to the nature of this application.
+1
A:
Call GetWindowThreadProcessId and compare the returned process Id against your own (via GetCurrentProcessId) seems simple.
Chris Becke
2010-05-31 07:14:27
Awesome! Works perfectly! THANK YOU!
simba
2010-05-31 07:36:30