Ineptness? While he is large, boisterous, and a bit of a buffoon, you have to give Balmer credit for greatly increasing Microsoft's market value over the length of his tenure as CEO and for starting many of the initiatives that are coming to fruition under Nadella.
Apple hasn't really overtaken Microsoft. Apple focuses on consumer tech. That takes large R&D budgets, large design budgets, and a lot of risk. It is also a segment where you have to continually invent new markets or else you will become irrelevant very quickly. Microsoft has always focused on the enterprise. There are large dollars there without the huge risk of being a consumer oriented tech company. Sure, Apple has more cash on hand and a larger market cap than Microsoft. That's not at all the same as Microsoft being on the ropes. One or two major flops or missed opportunities and Apple's fortunes will turn quickly. The enterprise isn't going anywhere. Both companies have their market segments identified and are doing just fine in them.