|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Pierre MEDART
|
Sep 27, 2007 - 4:30 AM
|
In our application, users can run scripts on various object.
The scripts are triggered by a contextual menu that is associated with a range of command ids.
We build a CMenu and use it to create the CExtPopUpMenu.
Our issue is that if we have two type of object, A and B, having different script defined on themselves AScript1, AScript2, BScript1, but we use the same ID1 for AScript1 and BScript1.
When we rightclick for the first time on a B object, the contextual menu is correctly displayed but if we call it on a A object than the contextual menu will be BScritp1 and AScript2
I guess it is because the command manager links the ID1 with BScript1. Is there a way to tell the CommandManager that the displayed text must be updated ?
|
|
Pierre MEDART
|
Sep 27, 2007 - 7:25 AM
|
Thanks, with a few changes we could make it.
|
|
Suhai Gyorgy
|
Sep 27, 2007 - 6:21 AM
|
g_CmdManager->UpdateFromMenu(AfxGetApp()->m_pszProfileName, IDR_YOUR_MENU, true); should do the trick.
|
|