Print Page | Close Window

create multiple menu

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=7752
Printed Date: 13 November 2025 at 11:56am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: create multiple menu
Posted By: coreware
Subject: create multiple menu
Date Posted: 08 August 2007 at 4:25am

Hi

I'm developing multi-monitor application.
I use one frame but want to use multiple menu(clone) for each window.
Help me please.
 
Joshua.



Replies:
Posted By: Simon HB9DRV
Date Posted: 08 August 2007 at 4:28am
As the use of multiple monitors grow I would like to see a Codejock solution for MDI applications so that I can use two or more monitorws with one App having View #1 in monitor 1 and View #2 in monitor 2.
 
I know I can almost do this with clever View / Docking pane logic, but a dark room, a lot of beer and the Codejock guys will no doubt come up with a good solution.


-------------
Simon HB9DRV


Posted By: coreware
Date Posted: 09 August 2007 at 12:47am
Well I did it as follows... Thanks.
 
CXTPMenuBar ** pMenuBar = new CXTPMenuBar * [m_nMonitorCount];
for(int i=0;i<m_nMonitorCount;i++){
      pMenuBar = pCommandBars->SetMenu(_T("Menu Bar"), IDR_MAINFRAME);
      if(pMenuBar == NULL){
         TRACE0("Failed to create menu bar.\n");
         return -1;      // fail to create
      }
      pMenuBar->EnableDocking(xtpFlagHideWrap);

      // Position Menu Bar
      if(i > 0){
         RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST, AFX_IDW_PANE_FIRST);
         CXTPWindowRect rcBar(pMenuBar[i-1]);
         rcBar.OffsetRect(m_cwMonitor[i-1].rect.Width(), 0);
         GetCommandBars()->DockCommandBar(pMenuBar, rcBar, pMenuBar[i-1]->GetDockBar());
      }
   }




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