Solved

Menu Bars

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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
deburging in oracle form 12 76
tripleUp challenge 7 67
How to convert MFC::CString to UTF8 wchar_t* 10 97
Sed question 2 48
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now