No - they bought first version of DOS (way before Windows), Windows in some respects was co-developed with IBM but I'd say it was mostly IBM funding Microsoft's R&D, clever deal for one side, not so for the other.
Google has got just one very good product - Google Search (I include here AdWords and AdSense), it is very good and makes lots of money. Microsoft is very much the same only they have got 2 products - OS (Windows) and Office. Almost everything else for both companies are loss leaders, even though Microsoft seems to be having some success with Xbox console game - new market for them but I doubt it will be big cash cow.
As you can see Google is very much like Microsoft including monopolistic position in its field - just check out the kind of rubbish predictions Bill Gates was making in the 90s, this "Intelligent Cloud" thingy is in the same ballpark.