I want to (programmatically) print documents of various types, by asking Windows to do it (using the default associated application). How can I do this (in .NET or C++/Win32 API)?
For example, if I have MS Office and Acrobat Reader installed on the machine, PDF files should be printed by Acrobat Reader, and DOC files should be printed by MS Word. But if I don't have MS Office installed, DOC files should be printed using Wordpad, or OpenOffice.org Writer if the latter is installed, or whatever application is currently the default association for that type of files.