Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Menu-problems in CDialog-based application

Posted on 1997-09-14
2
Medium Priority
?
668 Views
Last Modified: 2013-11-19
I have a CDialog-based application in which I have attached
a menu to the main dialog. (Both by setting the Menu-
property of the dialog and by explicitly doing CWnd::SetMenu
in my OnInitDialog.)

The menu seems to work OK and the COMMAND message for each
menu-item is correctly sent/called when selected. However,
I have not yet been able to get the UPDATE_COMMAND_UI
message to work.

(I want the UPDATE_COMMAND_UI so that I can implement a
simple MRU-list.)

What is missing to get this working?
0
Comment
Question by:Daniel_E
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Accepted Solution

by:
RONSLOW earned 800 total points
ID: 1306258
You need to handle WM_INITPOPUPMENU and use basically the same code (copy and paste it) as the MFC CFrameWnd code for OnInitPopupMenu

This code creates a CCmdUi for the menu and calls DoUpdate which doe sall the work for you.

0
 
LVL 1

Author Comment

by:Daniel_E
ID: 1306259
Thanks a lot for the quick answer!

0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question