Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Dismiss popup menu
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Dismiss popup menu

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


Joined: 08 September 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote EugeneSemashko Quote  Post ReplyReply Direct Link To This Post Topic: Dismiss popup menu
    Posted: 08 September 2008 at 9:11am
Hello, i have a popup menu created with CXTPPopupBar class. I can't dismiss this menu sending it's owner WM_CANSELMODE message. And finally i can't find HMENU currently displayed on window. Menu was created by this code:

  CXTPPopupBar* pMenu = GetPtr(CXTPPopupBar,menu_index);
  CMainFrame* pFrame = GetMainWnd();
  CPoint pt;
  int flags = TPM_RETURNCMD | TPM_RIGHTBUTTON | TPM_CENTERALIGN | TPM_TOPALIGN;
  int choice;

  pt.x = x; pt.y = y;
  ::ClientToScreen(pFrame->CoorHwnd(), &pt);

  pFrame->GetCommandBars()->TrackPopupMenu(pMenu, flags, pt.x, pt.y, pFrame);
 

EugeneSemashko
Back to Top
EugeneSemashko View Drop Down
Newbie
Newbie


Joined: 08 September 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote EugeneSemashko Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2008 at 9:30am
It very important for me
EugeneSemashko
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 September 2008 at 9:32am
Hello,
 
Call pCommandBars->ClosePopups(); to close all popup menus.
 
our Menus doesn't have HMENU. Use CXTPControls/CXTPControl methods  instead.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
EugeneSemashko View Drop Down
Newbie
Newbie


Joined: 08 September 2008
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote EugeneSemashko Quote  Post ReplyReply Direct Link To This Post Posted: 09 September 2008 at 5:34am
Hello! It's work! Thank you for help
EugeneSemashko
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.047 seconds.