Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem Setting Menu Item Attributes (No MFC)

Status
Not open for further replies.

Milby7

Programmer
Dec 5, 2003
67
GB
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)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top