I just want to be able to close/kill chosen program in list just based on the window title.
There are a number of potential problems in killing a process based on a window handle.
Serge is right in that you could send the program a WM_QUIT but, that may not close/kill the program. For instance, if a process has two threads with their inputs attached to the same message queue, sending a WM_QUIT will only cause one of the threads to stop pumping messages and won't end the program. What happens after one of the threads stops pumping messages depends on the application but, the result is unlikely to be anything desirable.
Another situation where the result is unlikely to be a desirable one is when a process has more than one thread pumping messages from independent message queues. Forcefully ending one thread's message pump by using WM_QUIT won't end the process and, what's happens after that is unpredictable.
Actually, I don't know exactly what happens in those cases because I've never used the method you're suggesting. It's not "clean", not reliable and, it opens the door to quite a few problems.
You're probably better off using TerminateProcess and relying on the O/S to clean up whatever is left behind by the terminated process. For that, the handle has to have the right to end the process. There will likely be some processeses your program won't be able to end/terminate.
A more "polite" way would be to send the target window a WM_CLOSE. That doesn't guarantee the process will end but, at least the user may have a chance to close the program gracefully.
HTH.