[gme-users] Adding a menu item that invokes a class...

Kevin Smyth ksmyth at isis.vanderbilt.edu
Tue May 15 10:28:26 CDT 2012

Hi Andrew,


I'm not quite sure what you've done here or what the problem is, but
perhaps you'd be better off creating a self-contained example of the
problem and asking an MFC listserv (do they still have traffic?).




From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Andrew
Sent: Thursday, May 10, 2012 8:32 AM
To: gme-users
Subject: [gme-users] Adding a menu item that invokes a class...


... which (should) invoke a dialog box.

Things I've done/checked so far:

Created a simple Dialog box with a few controls (edit, text, etc) and
saved it to the resource folder in GME/GME.rc/Dialog

I added an auto-gen'd event handler which created a new class (Class.cpp
for the purposes of this example)   Note: the Class::Class(CWnd
*pParent) : CDialogEx(Class::IDD, pParent) constructor is empty, I'm not
sure if that's relevant but I don't think it is..

There's a MESSAGE_MAP COMMAND(menu_item_id, &class::member_function())
invocation within the Class.cpp was auto-generated. It's wrapped in the
standard BEGIN_MESSAGE_MAP macro stuff.

However: when the menu item is clicked, the item remains gray. The
properties for "enabled=true" and "gray=false" are both properly
configured. So, I assume this is error is due to  the message handler
isnt registered

I'm lost! any help would be appreciated, again.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20120515/9270c5df/attachment.html 

More information about the gme-users mailing list