PDA

Click to See Complete Forum and Search --> : Determine hwnd of changable window


MartinLiss
Jan 26th, 2000, 04:12 AM
I know that I can use FindWindow to determine the hwnd of an application that has a fixed window name, but what API would I use to determine the hwnd of an app like FreeCell which changes the game number in its window from, for example, "FreeCell Game #1234" to FreeCell Game #3451" depending on the game being played?

------------------
Marty
Why is it called lipstick if you can still move your lips?

Serge
Jan 26th, 2000, 04:26 AM
Marty, why not to search the class name of that window, instead of a caption?

But if you still need to find the window by it's caption then you can use EnumWindows API to loop through all open windows and then use InStr function to find out if the FreeCell is present.

------------------

Serge

Programmer Analyst
sdymkov@microage.com
Access8484@aol.com
ICQ#: 51055819 (http://www.icq.com/51055819)