IMxDocument is not the same as IApplication, they are in two different co-classes. The document is derived from the application so you can't cast a document as application but you can cast the parent of the document as application because the parent of a document is the application. Hopefully that explanation helps.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.