I want to use the FindWindow API in conjunction with previnstance to find the handle of the previous instance of my app. However, the caption on my form is variable depending on what it is doing and there may be more than one window with the classname "ThunderRT6FormDC". So, my questions are:

Is there any way to get FindWindow to return an array with the hwnd's to all applicable windows so as i can find the correct one from there (i.e. by checking its icon or something)?

OR

Can I search for just part of a form's caption? This way i could keep part of the caption (for example: the first four letters) constant and use FindWindow to search for that?

Hope that makes some sense

Thanx