Struggling Newbie |
Post Reply |
Author | |
ludwig
Newbie Joined: 29 September 2008 Location: United Kingdom Status: Offline Points: 5 |
Post Options
Thanks(0)
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. |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
(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 |
|
ludwig
Newbie Joined: 29 September 2008 Location: United Kingdom Status: Offline Points: 5 |
Post Options
Thanks(0)
|
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?
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |