Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Adding menu items to specified subentries
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Adding menu items to specified subentries

 Post Reply Post Reply
Author
Message
VeRtEX0815 View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote VeRtEX0815 Quote  Post ReplyReply Direct Link To This Post Topic: Adding menu items to specified subentries
    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

Back to Top
VeRtEX0815 View Drop Down
Newbie
Newbie


Joined: 01 November 2004
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote VeRtEX0815 Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2004 at 8:33am
anyone?
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


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 November 2004 at 12:11pm

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

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