Click here to Skip to main content
15,902,447 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWhat does this mean ?? Pin
Cedric Moonen4-Feb-04 22:27
Cedric Moonen4-Feb-04 22:27 
AnswerRe: What does this mean ?? Pin
wb4-Feb-04 22:32
wb4-Feb-04 22:32 
AnswerRe: What does this mean ?? Pin
Prakash Nadar5-Feb-04 0:09
Prakash Nadar5-Feb-04 0:09 
GeneralRe: What does this mean ?? Pin
Cedric Moonen5-Feb-04 1:09
Cedric Moonen5-Feb-04 1:09 
GeneralRe: What does this mean ?? Pin
Prakash Nadar5-Feb-04 3:27
Prakash Nadar5-Feb-04 3:27 
GeneralRe: What does this mean ?? Pin
Ravi Bhavnani5-Feb-04 2:07
professionalRavi Bhavnani5-Feb-04 2:07 
GeneralDisabling Menu Items..! Pin
Halloko4-Feb-04 22:07
Halloko4-Feb-04 22:07 
GeneralRe: Disabling Menu Items..! Pin
Roger Allen4-Feb-04 23:24
Roger Allen4-Feb-04 23:24 
Your code is working correctly, but the state of the menu item is being changed back to enabled by how MFC works. When a menu is about to be displayed, MFC will fire of a ON_UPDATE_COMMAND_UI handler for every item in the menu. If you handle this and disable the specific menu item in that handler, it will work OK. If you do not handle it, MFC will enable the menu item by default if a ON_COMMAND handler exists in the call tree for that item (i.e app/mainframe, doc or view).

So, you really need to enable/gray the item in the ON_UPDATE_COMMAND_UI handler for that specific menu item


Roger Allen - Sonork 100.10016
Roger Wright: Remember to buckle up, please, and encourage your friends to do the same. It's not just about saving your life, but saving the quality of life for those you may leave behind...
GeneralRe: Disabling Menu Items..! Pin
Halloko5-Feb-04 6:08
Halloko5-Feb-04 6:08 
Questionhow can i do profile on vc7? Pin
novachen4-Feb-04 21:26
novachen4-Feb-04 21:26 
AnswerRe: how can i do profile on vc7? Pin
Mike Dimmick4-Feb-04 23:53
Mike Dimmick4-Feb-04 23:53 
QuestionMicrosoft Installer vs. InstallShield??? Pin
schaereran@gmx.net4-Feb-04 21:18
schaereran@gmx.net4-Feb-04 21:18 
AnswerRe: Microsoft Installer vs. InstallShield??? Pin
Mike Dimmick5-Feb-04 0:00
Mike Dimmick5-Feb-04 0:00 
Generalhelp for INA Grid Control Pin
skpanda4-Feb-04 20:47
skpanda4-Feb-04 20:47 
GeneralInsert Slider Control Pin
swarnamanoo4-Feb-04 19:20
swarnamanoo4-Feb-04 19:20 
GeneralRe: Insert Slider Control Pin
David Crow5-Feb-04 3:32
David Crow5-Feb-04 3:32 
QuestionChanging the Background color of dialog? Pin
Prakash Nadar4-Feb-04 19:01
Prakash Nadar4-Feb-04 19:01 
AnswerRe: Changing the Background color of dialog? Pin
PJ Arends4-Feb-04 19:14
professionalPJ Arends4-Feb-04 19:14 
GeneralRe: Changing the Background color of dialog? Pin
Prakash Nadar4-Feb-04 19:53
Prakash Nadar4-Feb-04 19:53 
AnswerRe: Changing the Background color of dialog? Pin
RChin5-Feb-04 1:54
RChin5-Feb-04 1:54 
GeneralHelp with Static Variables Pin
darth_infamous4-Feb-04 17:34
sussdarth_infamous4-Feb-04 17:34 
GeneralRe: Help with Static Variables Pin
wb4-Feb-04 18:55
wb4-Feb-04 18:55 
GeneralRe: Help with Static Variables Pin
twing4-Feb-04 19:10
twing4-Feb-04 19:10 
GeneralRe: Help with Static Variables Pin
rrrado4-Feb-04 23:08
rrrado4-Feb-04 23:08 
GeneralCopying Directory and contents Pin
azusakt4-Feb-04 17:23
azusakt4-Feb-04 17:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.