FindWindow() internally sends each top-level window a WM_GETTEXT message. But if the thread that owns that window is blocked (e.g., a Semaphore, a Mutex, an Event, an I/O operation), SendMessage() will block until that thread frees up and runs. Since this could potentially never happen, FindWindow() will block forever.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne