Using a class name as a filter is not a good idea, because there may be created a lot of windows with the same class name.
Better would be to check process handle or/and process id of the process...