Click here to Skip to main content
15,905,563 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: After OnInitDialog() Pin
DougW4823-Sep-03 16:06
DougW4823-Sep-03 16:06 
GeneralRe: After OnInitDialog() Pin
Jonas Larsson24-Sep-03 0:54
Jonas Larsson24-Sep-03 0:54 
QuestionDerived Class: What are the rules ? Pin
wogerdoger23-Sep-03 13:49
wogerdoger23-Sep-03 13:49 
AnswerRe: Derived Class: What are the rules ? Pin
Joaquín M López Muñoz23-Sep-03 20:25
Joaquín M López Muñoz23-Sep-03 20:25 
GeneralRe: Derived Class: What are the rules ? Pin
wogerdoger25-Sep-03 2:00
wogerdoger25-Sep-03 2:00 
Generalxy plot in a mschart control Pin
Julihc23-Sep-03 12:08
Julihc23-Sep-03 12:08 
GeneralRe: xy plot in a mschart control Pin
silverware18-Dec-03 0:06
silverware18-Dec-03 0:06 
GeneralUPDATE_COMMAND_UI (and yes, I've read the FAQ) Pin
duckpuppy23-Sep-03 11:40
duckpuppy23-Sep-03 11:40 
As I'm a fairly new MFC programmer, I'm sure there is an easy explaination for my question. I've just run out of ideas on where to find it. I've solved this a different way than I think I should have to, and want to know why I had to.

I have options that I have placed on the file menu. I want those options to grey out if a certain boolean is set/unset. Easy so far. I added UPDATE_COMMAND_UI handlers for those options. My understanding is that each command on the File menu with an UPDATE_COMMAND_UI handler will have that handler called when the user attempts to drop down the file menu. Using breakpoints, I have discovered that this is not the case. The only time one of those handlers is called (or at least in my project) is when the particular option on the file menu is selected, and then it is the update handler for that option only. No, I have not confused COMMAND and UPDATE_COMMAND_UI. I have both, and of course each is mapped to a different function. Using OnInitMenu, I have been able to set the state of all menu items properly, but that seems to be a brute force method rather than the nicer update handlers.

This isn't the only problem menu, either. I have an options menu with a second pop-up menu with 2 options, only one of which should be checked. The update handlers would be perfect... one line of code in each handler. However, they act the same. Only when I PICK one of the options is the update handler called, concurrently with the command handler. So, I have more complex logic in the OnInitMenu function to set their checked states when the menu is opened rather than the nicer update handlers... any help, please?

GeneralRe: UPDATE_COMMAND_UI (and yes, I've read the FAQ) Pin
David Crow23-Sep-03 16:49
David Crow23-Sep-03 16:49 
GeneralRe: UPDATE_COMMAND_UI (and yes, I've read the FAQ) Pin
Michael Dunn23-Sep-03 17:20
sitebuilderMichael Dunn23-Sep-03 17:20 
GeneralRe: UPDATE_COMMAND_UI (and yes, I've read the FAQ) Pin
duckpuppy24-Sep-03 6:16
duckpuppy24-Sep-03 6:16 
GeneralRe: UPDATE_COMMAND_UI (and yes, I've read the FAQ) Pin
duckpuppy24-Sep-03 6:21
duckpuppy24-Sep-03 6:21 
GeneralRe: UPDATE_COMMAND_UI (and yes, I've read the FAQ) Pin
Michael Dunn24-Sep-03 9:17
sitebuilderMichael Dunn24-Sep-03 9:17 
GeneralCreating a folder Pin
Tom Wright23-Sep-03 11:20
Tom Wright23-Sep-03 11:20 
GeneralRe: Creating a folder Pin
Joaquín M López Muñoz23-Sep-03 11:30
Joaquín M López Muñoz23-Sep-03 11:30 
GeneralRe: Creating a folder Pin
Tom Wright23-Sep-03 11:53
Tom Wright23-Sep-03 11:53 
GeneralRe: Creating a folder Pin
RChin23-Sep-03 11:38
RChin23-Sep-03 11:38 
GeneralC++ Question. Pin
WREY23-Sep-03 10:51
WREY23-Sep-03 10:51 
GeneralRe: C++ Question. Pin
Joaquín M López Muñoz23-Sep-03 10:56
Joaquín M López Muñoz23-Sep-03 10:56 
GeneralUnderstood!! Pin
WREY23-Sep-03 11:22
WREY23-Sep-03 11:22 
GeneralRe: Understood!! Pin
Blake Coverett23-Sep-03 15:46
Blake Coverett23-Sep-03 15:46 
GeneralRe: Understood!! Pin
jhwurmbach24-Sep-03 0:13
jhwurmbach24-Sep-03 0:13 
GeneralOPENGL EXAMPLE TO DISPLAY JAPANESE/CHIENSE Pin
sdfdsfa23-Sep-03 10:39
sdfdsfa23-Sep-03 10:39 
GeneralList Exchange Servers Pin
Robert M Greene23-Sep-03 10:37
Robert M Greene23-Sep-03 10:37 
Generaldouble problem Pin
Sirrius23-Sep-03 10:32
Sirrius23-Sep-03 10:32 

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.