Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - How can I change menu position?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can I change menu position?

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


Joined: 06 October 2009
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote peony7 Quote  Post ReplyReply Direct Link To This Post Topic: How can I change menu position?
    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;
}
 
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.125 seconds.