FindWindow

  • Thread starter Thread starter Jon
  • Start date Start date
J

Jon

Hello I am trying to use findwindow to list all the instances of an
application given a specific class name i.e multiple instances of notepad.
however findwindow will only find 1 instance of notepad and not anyothers if
more than one notepad is running. How do I detect all the instances of
notepad that are running?
 
Jon said:
Hello I am trying to use findwindow to list all the instances of an
application given a specific class name i.e multiple instances of notepad.
however findwindow will only find 1 instance of notepad and not anyothers if
more than one notepad is running. How do I detect all the instances of
notepad that are running?
have a look at FindWindowEx
hth
 
Jon said:
Hello I am trying to use findwindow to list all the instances of an
application given a specific class name i.e multiple instances of notepad.
however findwindow will only find 1 instance of notepad and not anyothers
if
more than one notepad is running. How do I detect all the instances of
notepad that are running?

The canonical method is to call EnumWindows(). A callback is dispatched to
you for every top-level window in the system. Inspect the window's class
there and add it to a list or ignore it as appropriate.

Regards,
Will
 
Back
Top