Menu Addin Context

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?

Subject: just a guess, not sure

when you got a notehandle you could use NSFNoteGetInfo with _NOTE_DB, followed by NSFDbPathGet.

hope that helps.

Markus Seitz

markus.seitz@icodex.com

Subject: RE: just a guess, not sure

Unless I’m missing something, I don’t see an easy way to get a notehandle either.

Subject: *No, it is one of the great limitations of the menu add-ins

Subject: Another words…*No, it is one of the great limitations of the menu add-ins

there is no way to get to the notehandle form the docuement? That seems odd in the least.

Subject: RE: Another words…*No, it is one of the great limitations of the menu add-ins

“Odd” is the kindest word I can think of to describe it.