Hi,
I’m programming a menu addin(based on UIADDIN) with the ‘C API Tool Kit 6.5’ and ‘Lotus Notes 6.5’. I have installed a menu command “Extract e-mail”.
When a note is selected on the list and the user press “Extract e-mail” (text file). I want to retrieve to handle of the selected note.
Is it possible in a menu addin (via LNCALLBACK) and how can one do it?
NAMRESULT LNCALLBACK AddinMenuProc (WORD wMsg, LONG lParam)
{
static WORD startingID; // the Notes ID for the first addin menu
item
switch (wMsg)
{
case NAMM_INIT:
{
NAM_INIT_INFO *pInitInfo = (NAM_INIT_INFO *)lParam;
// Add the menu item to the Notes Actions menu
// Assign this menu item an id and a name
pInitInfo->wMenuID = IDM_STORE_MESSAGE;
strcpy(pInitInfo->MenuItemName, STR_STORE_MESSAGE);
if (pInitInfo->wMenuItemNumber == 0) startingID = pInitInfo-
wStartingID;
// Tell Notes that there are no more menu items to add
return (NAM_INIT_STOP);
}
case NAMM_INITMENU:
{
NAM_INITMENU_INFO *pInitMenuInfo = (NAM_INITMENU_INFO *)lParam;
WORD Flags;
if ((pInitMenuInfo->Data.Context == NAM_IN_VIEW) &&
(pInitMenuInfo->Data.fCanExport))
Flags = MF_ENABLED | MF_BYCOMMAND;
else
Flags = MF_GRAYED | MF_BYCOMMAND;
EnableMenuItem( pInitMenuInfo->hMenu, startingID +
IDM_STORE_MESSAGE, Flags);
}
case NAMM_COMMAND:
{
NAM_COMMAND_INFO *pCommandInfo = (NAM_COMMAND_INFO *)lParam;
VIEWIXDATA ViewData;
HANDLE hSelectedList;
switch (pCommandInfo->wMenuID)
{
case IDM_STORE_MESSAGE:
if ((pCommandInfo->Data.Context == NAM_IN_VIEW) &&
(pCommandInfo->Data.fCanExport))
{
// Store message
ViewData = pCommandInfo->Data.IXData.View;
hSelectedList = pCommandInfo-
Data.IXData.View.hSelectedList;
HERE IT DOES NOT WORK, I CAN'T DO ANYTHING WITH
hSelectedList
}
break;
}
}
case NAMM_TERM:
return (NAM_NOERROR);
default:
return (NAM_NOERROR);
}
}
Thanks for any assistance or suggestions.
Regards
Ron Roland
PS; IDE is MS Visual C++ 7.1.