Hi all,

I'm trying to make a C3PO in C# and for the most part, things are working: I
can place a button on the email toolbar, into the Actions menu on the main
GW window, etc. I also want to add a menu item to the context menu that pops
up when right-clicking an email (bot not for appointments, etc., only for

From what I understand, I need to register for the GW.MESSAGE.MAIL context
for this and I need to add code in CommandFactory.CustomizeContextMenu() to
add the menu item when the popup menu is created. Here is what I have in

public void CustomizeContextMenu ( ref string sGWContext, ref object
oGWMenu )
GroupWiseHelper.LogMsg (
"CommandFactory.CustomizeContextMenu" );
GroupWiseHelper.LogMsg ( " Context: " + sGWContext );

C3POTypeLibrary.GWMenu oMenu;
C3POTypeLibrary.GWMenuItems oMenuItems;

if ( !String.IsNullOrEmpty ( sGWContext ) )
if ( sGWContext.StartsWith ( "GW.MESSAGE.MAIL" ) )
oMenu = (C3POTypeLibrary.GWMenu) oGWMenu; // Get Main
menu object
oMenuItems = (C3POTypeLibrary.GWMenuItems)
oMenuItems.Add ( "New Menu", CreateMenuCommand (),
null );

The problem is, however, that CustomizeContextMenu never gets called. (The
the LogMsg() calls at the beginning of the function never execute.) All
other calls (CustomizeMenu(), CustomizeToolbar()) are coming in, it's just
CustomizeContextMenu() that never gets called.

I'm using the 7.0.1 evaluation version of GroupWise.

Gyorgy Bozoki