Print Page | Close Window

Adding menu items to specified subentries

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1352
Printed Date: 06 November 2025 at 11:22pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Adding menu items to specified subentries
Posted By: VeRtEX0815
Subject: Adding menu items to specified subentries
Date Posted: 01 November 2004 at 4:59am

Hi xtp support team,

I am trying to add a new control(menu entry) to a given control(entry). File->Recent Files it is called. I want to add and remove recent file menu entries. Currently i do it like the following:

CXTPControls* menuCtrl = pMenuBar->GetControls();
CXTPControl* recentFilesCtrl = menuCtrl->FindControl(ID_FILE_RECENTFILES);

I firct of all the the menu bar controls and try to find the given control the ID_FILE_RECENTFILES, which works.  But how to go on then?
I also checked another approach

CXTPControlButton* pControl = (CXTPControlButton*)menuCtrl->Add(xtpControlButton, ID_FILE_RECENTFILES_NOFILE1, _T(app->mRecentFileNames[0].AsChar()), 2);

I think that is the normal way of adding controls to a menu. This also works but with that method i cannot add the control to a submenu entry, but only to the top. So like File or Edit. But i want to add it to a subentry item in the File submenu.

How can i do that?

- Benjamin




Replies:
Posted By: VeRtEX0815
Date Posted: 06 November 2004 at 8:33am
anyone?


Posted By: Oleg
Date Posted: 08 November 2004 at 12:11pm

I think see \Samples\CommandBars\DynamicPopups\  can help.



-------------
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