Rotten wood (dry or wet rot) is a terminal disease beyond repair.You will have to replace the whole frame. Meanwhile, as a "first aid" procedure, you can use some "wood putty" to fill the rotten parts and paint the whole frame with a thick coat of water resistant paint, after the putty is dry. This might stop the water from coming in for a while but will not stop the spreading of the rot.
The search for people who can answer your question continues for as long as needed - until you find the answer you were looking for.
When an answer is posted by someone who was invited (byYedda or by yourself) to answer your question, their answer is marked with a yellow "invited by Yedda".
To be invited to answer other people's questions in your areas of knowledge and interest, be sure to list your favorite topics:
» My Settings My Topics.
Of course, the more helpful your answers are, the more likely you are to be invited to future questions...