Solved

Menu Bars

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Adapt this command to show who installed 29 108
ORA-01403: no data found 43 98
Complete beginner needs help making a cron job 9 116
Annoying "thing" blocks my view 4 98
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…
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
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.

813 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

15 Experts available now in Live!

Get 1:1 Help Now