Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - create multiple menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

create multiple menu

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


Joined: 27 July 2007
Location: Korea, South
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote coreware Quote  Post ReplyReply Direct Link To This Post Topic: create multiple menu
    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.
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
coreware View Drop Down
Newbie
Newbie


Joined: 27 July 2007
Location: Korea, South
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote coreware Quote  Post ReplyReply Direct Link To This Post 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());
      }
   }

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