Print Page | Close Window

Dismiss popup menu

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=12099
Printed Date: 28 February 2025 at 6:46pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Dismiss popup menu
Posted By: EugeneSemashko
Subject: Dismiss popup menu
Date 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



Replies:
Posted By: EugeneSemashko
Date Posted: 08 September 2008 at 9:30am
It very important for me

-------------
EugeneSemashko


Posted By: Oleg
Date 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


Posted By: EugeneSemashko
Date Posted: 09 September 2008 at 5:34am
Hello! It's work! Thank you for help

-------------
EugeneSemashko



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