Solved

Menu Bars

Posted on 1998-06-29
2
173 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
bobThere java chalenge 45 95
Named range not carried over 10 66
dog bark java program 15 120
difference between String.subString() and String.subSequence() 6 265
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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