Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How to remove menu item
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to remove menu item

 Post Reply Post Reply
Author
Message
Heath View Drop Down
Groupie
Groupie


Joined: 05 April 2004
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Heath Quote  Post ReplyReply Direct Link To This Post Topic: How to remove menu item
    Posted: 31 January 2011 at 6:17am
Hi,
 
Using command bars we have a menu item in the MainFrame which we want to remove (not hide) on startup.  I found the HideCommand() function, but I can't find a Remove equivalent. Confused
 
If there isn't an easy method using CJ (would be nice if there was), can someone recommend a quick way of doing it.
 
Thanks,
Heath.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 31 January 2011 at 7:58am
Hi,

pMenuBar->GetControls()->Remove(nIndex);


Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Heath View Drop Down
Groupie
Groupie


Joined: 05 April 2004
Status: Offline
Points: 20
Post Options Post Options   Thanks (0) Thanks(0)   Quote Heath Quote  Post ReplyReply Direct Link To This Post Posted: 31 January 2011 at 10:57am
Thanks Oleg.
 
That sent me in the right direction.
 
Regards,
Heath.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.