Hi!
I'm trying to insert & update menu items in Outlook 2K from an in-proc extension (run on Win2K). I've had no problems inserting them, but whenever I try to update their captions, checkmarks or hide them (before they're displayed), it's not working! The only thing that I can get to work is to enable/disable them.
I've been adding the menu items as follows:
InsertMenu(hMenu,
nPrecedeThisItemPos,
MF_BYPOSITION | MF_STRING,
cmdidMenuItem,
lpOriginalCaption);
I've been setting the captions as follows:
ModifyMenu(hMenu, // hMnu
cmdidMenuItem, // uPosition
MF_BYCOMMAND | MF_STRING, // uFlags
cmdidMenuItem, // uIDNewItem
lpDifferentCaption); // lpNewItem
(Nothing happens)
I've been setting checkmarks as follows:
CheckMenuItem(hMenu,
cmdidMenuItem,
MF_BYCOMMAND | MF_CHECKED);
(I get a box with the checkmark missing. Do you have to insert it with a certain style/flag?? I've even tried using my own bitmap. Doesn't work!!)
I don't really know how to set a menu item to invisible/visible, so I've tried using ModifyMenu with the uIDNewItem parameter set to 0!? Is this right??
I think this may be a bit of a weird problem, so is there a way of hacking @ menu items to get round these problems?? (Remembering that you don't actually 'own' the menu)
I'm trying to insert & update menu items in Outlook 2K from an in-proc extension (run on Win2K). I've had no problems inserting them, but whenever I try to update their captions, checkmarks or hide them (before they're displayed), it's not working! The only thing that I can get to work is to enable/disable them.
I've been adding the menu items as follows:
InsertMenu(hMenu,
nPrecedeThisItemPos,
MF_BYPOSITION | MF_STRING,
cmdidMenuItem,
lpOriginalCaption);
I've been setting the captions as follows:
ModifyMenu(hMenu, // hMnu
cmdidMenuItem, // uPosition
MF_BYCOMMAND | MF_STRING, // uFlags
cmdidMenuItem, // uIDNewItem
lpDifferentCaption); // lpNewItem
(Nothing happens)
I've been setting checkmarks as follows:
CheckMenuItem(hMenu,
cmdidMenuItem,
MF_BYCOMMAND | MF_CHECKED);
(I get a box with the checkmark missing. Do you have to insert it with a certain style/flag?? I've even tried using my own bitmap. Doesn't work!!)
I don't really know how to set a menu item to invisible/visible, so I've tried using ModifyMenu with the uIDNewItem parameter set to 0!? Is this right??
I think this may be a bit of a weird problem, so is there a way of hacking @ menu items to get round these problems?? (Remembering that you don't actually 'own' the menu)