Archive: FindWindow Wildcard


FindWindow Wildcard
Is it possible to search for a WindowTitle using a wildcard?

My situation is that I can't use the WindowClass and my application's window title is dynamic. However, there's always a substring of the window title that is static. If I can use a wildcard when specifying my WindowTitle when using FindWindow, it would be possible to locate my application.


http://nsis.sourceforge.net/Enhanced...ow_class_names


That would work if I was searching by class name. But I'm not. I'm searching by window title.


I think you need to play with EnumWindows, EnumChildWindows with GetWindowText and lstrcmp.


You should be able to just replace the call to GetClassName with GetWindowText

Another option would be to use something like RegisterWindowMessage in your application, and send the message(with timeout) to all top level windows and look for a non 0 return in the installer (not fool proof, but neither option is)


i wrote that function.

window title = class name.