Print Page | Close Window

Menu is not expanding to it full extend

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=6959
Printed Date: 12 November 2025 at 5:45pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Menu is not expanding to it full extend
Posted By: KumarCJ
Subject: Menu is not expanding to it full extend
Date Posted: 24 April 2007 at 2:39am
Hi,
 
Thanks for your reply, my concern is below:
 
The Edit menu looks like below
 
Cut       ctrl+x
Copy    ctrl+c
Paste   ctrl+v
 
But for the edit menu, system is displaying
 
Cut       square box in front of Cut
Copy    square box in front of Copy
Paste   square box in front of Paste
 
it is not displaying, ctrl+x, ctrl+c, ctrl+v for Cut, Copy, Paste.
 
I checked with privious version of application exe, the issue is "Edit" menu is not able expand to it full extend and some thing happening with one more menu.
 
 
pls let me why this is happening.
 
Here is the code what i had added for Code jock 10.4.2
 
int CMainFrame::OnCreate()
{
   // Initialize the command bars
   if (!InitCommandBars())
   return -1;
   // Get Commandbar
   CXTPCommandBar* pCommandBars = GetCommandBars();
   // Create MenuBar using CXTPMenuBar*
   CXTPMenuBar* m_wndMenuBar = pCommandBars->SetMenu(_T("Menu Bar"),  IDR_MAINFRAME);
  if(m_wndMenuBar == NULL)
  {
       TRACE0("Failed to create menu bar.\n");
       return -1;      // fail to create
  }
  m_wndMenuBar->SetFlags(xtpFlagAddMDISysPopup);
 
// Create ToolBar
    CXTPToolBar* m_wndToolBar = (CMCToolBar *) pCommandBars->Add(_T(g_cmcstandard), xtpBarTop);
    if (!m_wndToolBar || !m_wndToolBar->LoadToolBar(IDR_MAINFRAMELO))
    {
        TRACE0("Failed to create toolbar\n");
        return -1;
    }
 
m_wndToolBar->EnableDocking(xtpFlagAlignAny | xtpFlagFloating);
 EnableDocking(CBRS_ALIGN_ANY);
 
CXTPPaintManager::SetTheme(xtpThemeOffice2003);
}
 
 
Is i need add something which is going to expand the menu to its full extend?
 
waiting for your reply.
 
Thanks,
Saket Kumar.
 



Replies:
Posted By: Oleg
Date Posted: 24 April 2007 at 7:10am
Hi,
 
Call pCommandBars->GetShortcutManager()->SetAccelerators(IDR_RESOURCE);
where IDR_RESOURCE is accelerator table from your resources. (Check that it has accelerators for Cut/Copy etc)


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: KumarCJ
Date Posted: 24 April 2007 at 8:25am
Thanks alot Oleg for your reply.



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