Solved

Menu???

Posted on 1998-10-21
1
222 Views
Last Modified: 2013-11-20
Hi,

I want to ask how to enable/disable the item at the menu.
eg. I want to disable one item after opening a document.
    Then enable this item after closing this document.
How can I do this?

Thanks.
0
Comment
Question by:cplau
1 Comment
 
LVL 1

Accepted Solution

by:
Bridge earned 40 total points
ID: 1323620
put this in you document cpp;

ON_UPDATE_COMMAND_UI(ID_???, OnUpdate???)

void CDocumentOverride::OnUpdate???(CCmdUI* pCmdUI)
{
   pCmdUI->Enable( FALSE );
}

put this in you document h;

afx_msg void OnUpdate???(CCmdUI* pCmdUI);
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

808 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