🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.windows.ms.programmer
1 messages
1 total messages Started by Peter Klug Wed, 22 Jul 1992 20:53
Problem altering menu text
#39
Author: Peter Klug
Date: Wed, 22 Jul 1992 20:53
24 lines
1523 bytes
I have an application in which I'd like to toggle the text for an item
in the menu bar.  It isn't a popup menu, simply a menu item.  Anyway,
from Volume 1 of the SDK Reference I've wound up with the following:

ModifyMenu(hmenu, MF_STRING, MF_BYCOMMAND, menuId, lpNewMenuStr)

I've read over the API for ModifyMenu several times and this seems
correct.  When I use it, it returns nil and there's no change to the
menu bar (I do call DrawMenuBar afterwards).  I've also tried it for a
menu item inside a popup menu with the same result.

If I call GetMenuString passing in the "menuId" I used in ModifyMenu,
it returns the text which is shown in the menu at that point (I tried
several IDs inside a popup menu and on the menu bar).  So apparently
I'm using the correct menuId.  Is there something wrong with my
syntax?  Is there some way I can find out why ModifyMenu is returning
nil?  Thanks.


--
*        Peter Klug         *  Peter_Klug@Software.Mitel.COM
*     Mitel Corporation     *  
*  Kanata, Ontario, Canada  *  Nostalgia ain't what it used to be.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads