HTC grew by jumping on bandwagons. Windows Mobile 6 was the product with an established market.
Furthermore, Microsoft engaged HTC in many matters of industrial design, and all these competencies allowed them to effectively move from being a PC company to a mobile phone company.
The situation for Nokia is somewhat different. MS is no longer the dominant platform in the mobile space.
However, MS still has the advantage of outlook/exchange being the dominant enterprise email solution. If MS can do a good job of integrating features like Sharepoint into WP7, then it has a strong position to defend.