While processing the NAMM_INITMENU message from the addin we have a different structure available depanding on what context we are in (ie View or Document). So far so good. While in the view context there is this nifty little member called hNoteFile which helps to determine whether a menu item should be enabled or disabled depending on the database context (lets say I only want it enabled in mail databases).
Now, obviously, while in the Document context this doesn’t work; My question is how can I obtain the database context while in the Document context?