Solved

Menu Bars

Posted on 1998-06-29
2
174 Views
Last Modified: 2013-11-20
In my MFC application, I want to grey out several fields in my "File" pulldown on the main menubar.   Yet, I have gone to the resource view and specified in the properties that each of these fields should be "greyed out", but it doesn't seem to work.   FYI, these are the "open" and "close", plus all of the "VIEW" characteriestics? Is there something that I'm missing?

Thanks
0
Comment
Question by:mulshine
[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 1

Accepted Solution

by:
motigust earned 30 total points
ID: 1318495
The right way to do it is to handle the UPDATE_COMMAND_UI message.

Use the wizard to generate a function for your items.

for example: to ovveride the UI message for file open:

BEGIN_MESSAGE_MAP(CMyApp, CWinApp)



ON_UPDATE_COMMAND_UI(ID_FILE_NEW, OnUpdateFileOpen)



END_MESSAGE_MAP()




void OnUpdateFileOpen(CCmdUI* pCmdUI){
 pCmdUI->Enable(FALSE);
}

0
 

Author Comment

by:mulshine
ID: 1318496
thanks. it worked
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Title # Comments Views Activity
matchUp  challenge 6 82
Thin secure Windows 10 5 116
Windows shortcut location resolution on double click open 4 76
Adjust the codes 3 63
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli‚Ķ
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Suggested Courses

739 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