Archive: using FindWindow when multiple windows have the same title


using FindWindow when multiple windows have the same title
Hey all,

I am trying to use FindWindow, GetDlgItem, and SendMessage to automatically answer a question that a program prompts for (the program is executed from the NSIS script). The problem is that there are two windows with the same title open at the same time, and FindWindow is returning the handle of the window that has no controls on it. Does anyone know how I might get the handle of the other window with the same title?

Thanks for your help.

uncle SJ


call FindWindow again with the first handle you got as childafter, or use EnumWindows with the system plugin (it has a sample in its readme)


it worked!
Anders, you are indeed a major dude. I used the first thing you suggested and eventually got it to work. Many thanks!:up: