quote:
Originally posted by SpunkyLoveMuff
If the class equals null then the API calls GetWindowText() and check to see if that matches any open windows...
I think either way it should be checking for "<filename> - Notepad"
EDIT: Beaten and it looks like I may be wrong
You're talking about the title, there's no need to search for it. It's the second parameter, the first one is class, which is the same for all Notepads windows.
Then, by making the second parameter NULL it will only search for windows with the class "Notepad".