Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Change Menu at Runtime
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Change Menu at Runtime

 Post Reply Post Reply
Author
Message Reverse Sort Order
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 Topic: Change Menu at Runtime
    Posted: 17 September 2003 at 12:12am

You can modify CXTPCommandBar at runtime.

Use CXTPCommandBar::GetControls() method to take collection of MenuBar's controls.

Back to Top
clintsinger View Drop Down
Newbie
Newbie


Joined: 15 May 2003
Location: Canada
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote clintsinger Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2003 at 5:23pm

Hi,

I would like to be able to take the MenuBar and change what is in it at runtime.

In the OnCreate of MainFrm.cpp we have the following line.

CXTPCommandBar* pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME);

How do I get the MenuBar as a CMenu* object so I can modify it at runtime?

Cheers,

Clint

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.188 seconds.