issue getting IMxDocumentPtr

Discussion created by castormalin on Sep 16, 2010

I've got a button that creates a layer. In the OnCreate() method of the button, I'm getting the IMxDocumentPtr that I store to have it available for my layer. That works properly.

However when I reload my layer using the load() method of the IPersistVariant interface, the IMxDocumentPtr is NULL whereas the OnCreate() method of the button seems to have been called. How can I get that IMxDocumentPtr when my layer is reloaded ?