Print Page | Close Window

Menu bar

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=9252
Printed Date: 01 March 2025 at 1:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu bar
Posted By: himanshu
Subject: Menu bar
Date 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



Replies:
Posted By: Oleg
Date 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


Posted By: himanshu
Date 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
 


Posted By: Oleg
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net