Print Page | Close Window

How can I change menu position?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=15300
Printed Date: 04 October 2024 at 5:50am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How can I change menu position?
Posted By: peony7
Subject: How can I change menu position?
Date Posted: 06 October 2009 at 5:02am
I made a toolbar , each toolbar button has a menu. I coded as follows.
 
but I have a problem. I would like to change the menu position like a TrackPopupMenu() function. Is there any method?
 
First time, I used TrackPopupMenu() function. But I couldn't use customize mode at the case.
 
 
int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)
{
  if (lpCreateControl->nID == ID_OPERATION)
  {
   CXTPControlPopup* pButton = CXTPControlPopup::CreateControlPopup(xtpControlButtonPopup);
   pButton->SetStyle(xtpButtonIcon);
   pButton->SetFlags(xtpFlagManualUpdate);

   CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(GetCommandBars());
   CMenu menu;
   menu.LoadMenu(IDR_MAIN_MENU);
   
   pPopupBar->LoadMenu(menu.GetSubMenu(1));
   pButton->SetCommandBar(pPopupBar);
   
   pPopupBar->InternalRelease();

   lpCreateControl->pControl = pButton;
   return TRUE;
  }
  return FALSE;
}
 



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