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

Struggling Newbie

 Post Reply Post Reply
Author
Message
ludwig View Drop Down
Newbie
Newbie
Avatar

Joined: 29 September 2008
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ludwig Quote  Post ReplyReply Direct Link To This Post Topic: Struggling Newbie
    Posted: 29 September 2008 at 12:57pm

Hello

I'm a complete newbie with CodeJock software.  I have commandbars and controls 2007.  I have a large existing project written in MS Visual C++ 6.0 with MFC, using MDI windows.  I have managed to convert my default menu and toolbars to use Xtreme CommandBars and MenuBar, but I have some questions.

(1) In my existing code, if the user switches between MDI windows, I currently override CView::OnActivateView and dynamically add and delete menus as appropriate for the current window.  I used to call GetMenu to retrieve the main application menu, but that no longer works.  I presume I now call GetCommandBars()->GetMenuBar() to retrieve a pointer to the application menu bar - is that right?  How do I then add or delete menus to this?

(2) The main application menu used to automatically list each open MDI Child Window at the bottom of the Windows menu.  That no longer happens.  How do I get that working again?  I notice that there is a method CXTPMenuBar::AddMDIMenu.  Can I use this?  It appears to take a resource ID, but I have no idea what the resource is for.

(3) How can I create context menus that have the same look and style as the application menus now have?

(4)I seem to be spending a long time trying to work out how to do things.  I have looked at samples, documentation, online help, and the Internet sites, but I still have loads of questions and cannot even work out how to use either the "Designer Studio" application or the "Resource Editor".  I'm not even sure what I'm supposed to be able to do with them, or whether I even need them (e.g. for toolbar and dialog design).  I want to improve the look of my toolbars and toolbar icons.  Do I need to use the Resource Editor for this?  Is there any good introduction info that I'm missing?  All help much appreciated.

Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 01 October 2008 at 4:05am
Hi;

(2):

Add a menu item with ID 35000 to your main menu. The rest is done by the toolkit.

(3):

just call CXTPCommandBars::TrackPopupMenu().

(4):

I'm using Axialis IconWorkshop (www.axialis.com) and/or Photoshop to create my bitmaps and icons.
I've never tried to use the tools provided by CJ to do this. Also the internal VS resource editor is unusable when alpha channels are required...

Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022
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: 01 October 2008 at 4:21am

(1)

Yes, you need use CXTPControls mehods to add/remove menus.
for example pMenuBar->GetControls()->Add(...);
pMenuBar->GetControls()->Delete(...); etc.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
ludwig View Drop Down
Newbie
Newbie
Avatar

Joined: 29 September 2008
Location: United Kingdom
Status: Offline
Points: 5
Post Options Post Options   Thanks (0) Thanks(0)   Quote ludwig Quote  Post ReplyReply Direct Link To This Post Posted: 04 October 2008 at 1:19pm
Thank you for your replies.  I tried adding a menu item with id 35000 to my top-level menu and it appeared to have no effect (it was as if it wasn't there at all).  I also tried adding it to the Windows menu - again, with no effect.  What should happen when I do this?
 
I'm still really struggling trying to work out how menus work.  One big problem I have is that I add menus dynamically in response to CMainFrame::OnInitMenu and CMainFrame::OnInitMenuPopup, and I handle clicks on them dynamically too in CMainFrame::OnCmdMsg.  Can I do anything like this with CodeJock menus?
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.191 seconds.