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

Menu bar

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


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Topic: Menu bar
    Posted: 08 January 2008 at 7:48am
Hi
 
i have used CXTPCommandBar class to get the menu bar like this

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

Now i want to add some new menus to this menubar apart from the one i have with IDR_MAINFRAME at runtime

How could i do this
thanks in advance
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: 08 January 2008 at 3:13pm

Hi,

try
CXTPControl* pControl = pMenuBar->GetControls()->Add(xtpControlPopup, -1);
pControl->SetCaption("New Menu");
etc.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
himanshu View Drop Down
Groupie
Groupie


Joined: 04 January 2008
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote himanshu Quote  Post ReplyReply Direct Link To This Post Posted: 09 January 2008 at 12:00am
hi
 
there are two problems i faced with this
one is if i add another menu afetr "New Menu" only the latest one added is visible and not the first abd it is shown at the last.
 
How to make all the menu's visible and how to set their positions according to what we want.
 
Could we insert our newly added menus in between the menus that IDR_MAINFRAME offers.
 
Secondly how to insert a button inside this newly created menu "New Menu" .
 
thanks
 
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: 10 January 2008 at 11:30am
Hi,
All menus have to be visible. You make something wrong.
Please check methods of CXTPControl and CXTPControls classes.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.094 seconds.