Print Page | Close Window

Popup Menu

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=127
Printed Date: 05 January 2025 at 4:39am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Popup Menu
Posted By: thodgson
Subject: Popup Menu
Date Posted: 11 August 2003 at 1:37pm

I have a popup menu, that doesn't do anthing fancy at all, which is having two problems:

The application is derived from the Outlook GUI example.  The popup menu appears in the frame with the ListView.  Functionally, when a user right clicks on a list item, the menu should pop-up.

1. The toolbar icons don't show up.  In my Mainframe class's OnCreate method, I am calling InstallCoolMenus and passing in the resource ID for the popup menu. 

2. The menu doesn't seem to respond to Update UI messages, e.g., certain items in the "main" menu are greyed out, but in the popup, they are not.

Maybe I'm missing something very simple, please let me know.  If you know of an example I can work with, please let me know.

 

Thanks!

 




Replies:
Posted By: thodgson
Date Posted: 12 August 2003 at 5:05pm

Got it.  In my TrackPopupMenu method call, I was passing in this instead of the active view:

 

Was:

pop->TrackPopupMenuEx( TPM_LEFTALIGN | TPM_RIGHTBUTTON,

point.x, point.y, this, NULL );

 

Now:

pop->TrackPopupMenuEx( TPM_LEFTALIGN | TPM_RIGHTBUTTON,

point.x, point.y, AfxGetMainWnd()->GetActiveWindow(), NULL );




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