ANSWERS: 1
  • I realize the question is old, but as far as I know the only way to do this is to enumerate the windows, retrieve the owner PID for each one, and compare it with your target PID. The problem is twofold: there's really no such thing as "the main window of an application"... that's a customary practice, not a design requirement of Windows. The other is that it's not such a common need to inquire about Windows of other apps, so I think MS just didn't feel obliged to invest much in making that convenient.

Copyright 2020, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy