Question
-
CreatorTopic
-
December 4, 2008 at 8:27 am #2165430
c++ help with EnableMenuItem
Lockedby jean_guy_bureau · about 14 years, 2 months ago
i am looking to gray out the submenu option department and manager in my sort menu
if i select a option in the filter
the code that i have is
CMenu* pMenu = GetParent()->GetMenu();
CMenu* submenu = pMenu->GetSubMenu(0);//pMenu->EnableMenuItem(3,MF_BYPOSITION|MF_GRAYED);
submenu->EnableMenuItem(ID_SORT_MANAGER,MF_BYPOSITION | MF_GRAYED);
submenu->EnableMenuItem(ID_SORT_DEPARTMENT,MF_BYPOSITION | MF_GRAYED);GetParent()->DrawMenuBar();
OnSortName();Topic is locked -
CreatorTopic
All Answers
-
AuthorReplies
-
-
December 4, 2008 at 8:27 am #2991917
Clarifications
by jean_guy_bureau · about 14 years, 2 months ago
In reply to c++ help with EnableMenuItem
Clarifications
-
December 4, 2008 at 8:49 am #2991894
-
December 4, 2008 at 9:06 am #2991881
i saw that wb site
by jean_guy_bureau · about 14 years, 2 months ago
In reply to Eaxample …
there is some thing that i am misssing
-
December 4, 2008 at 11:33 am #2991830
Alert !! > Rift in space-time continuum …
by older mycroft · about 14 years, 2 months ago
In reply to i saw that wb site
Sorry, but I’m pretty sure you told me something after [i]”there is some thing that i am missing..”[/i] But it never came through.
Please re-transmit. 😉
-
December 4, 2008 at 12:00 pm #2991813
what am i missing i have look in the page you sent me did not work
by jean_guy_bureau · about 14 years, 2 months ago
In reply to Alert !! > Rift in space-time continuum …
what am i missing i have look in the page you sent me did not work
i did some chage to my code what is missing or what am i missingCMenu* pMenu = GetParent()->GetMenu();
CMenu* submenu = pMenu->GetSubMenu(0);//pMenu->EnableMenuItem(3,MF_BYPOSITION|MF_GRAYED);
submenu->EnableMenuItem(ID_SORT_MANAGER,MF_BYCOMMAND | MF_GRAYED|MF_DISABLED);
submenu->EnableMenuItem(ID_SORT_DEPARTMENT,MF_BYCOMMAND | MF_GRAYED|MF_DISABLED);GetParent()->DrawMenuBar();
OnSortName(); -
December 4, 2008 at 12:22 pm #2991788
The clue was in the TITLE of the last entry …
by older mycroft · about 14 years, 2 months ago
In reply to what am i missing i have look in the page you sent me did not work
SPACE – TIME continuum.
Take some time and check the SPACE you have between your [line] values.
You appear to be incapable of checking the SPACING of your typing. 😉
[b][u]HINT:[/b][/u]
Cut & Paste the example from the M$ webpage, into Notepad, place the cursor in front of the top left character, then using the ‘advance’ cursor key – do a character count of the values.
Do the same for your own code.
Do it line for line.
The example has spaces that you don’t. 😉
-
December 4, 2008 at 1:00 pm #2991754
ok just call me stupid i do not see it
by jean_guy_bureau · about 14 years, 2 months ago
In reply to The clue was in the TITLE of the last entry …
CMenu* pMenu = GetParent()->GetMenu();
CMenu* submenu = pMenu->GetSubMenu(0);submenu->EnableMenuItem(ID_SORT_MANAGER,MF_BYCOMMAND | MF_GRAYED | MF_DISABLED);
submenu->EnableMenuItem(ID_SORT_DEPARTMENT,MF_BYCOMMAND | MF_GRAYED | MF_DISABLED);
GetParent()->DrawMenuBar();
OnSortName(); -
December 4, 2008 at 1:35 pm #2991735
OK – You’re STUPID !! …
by older mycroft · about 14 years, 2 months ago
In reply to ok just call me stupid i do not see it
Now, pardon me if I’m wrong, but your command of the English language appears to be substantive. Now notwithstanding the fact that you are American, and may have formed your own methodology of formatting written English, there are still a few constraints that have to be adhered to, one of which is that [b]after every comma there is usually a [u]SPACE[/u].[/b] This conformity is not just confined to [i]written[/i] English
Sorry, if that is beyond your understanding then, that is wholly your concern. I DO NOT wish to be harsh, but if you cannot read then why are you asking questions within a text-based forum ?
I also suggest you attempt to develop a personal sense of humour. 😉
-
December 4, 2008 at 1:46 pm #2991732
i am not american i am french canadian
by jean_guy_bureau · about 14 years, 2 months ago
In reply to ok just call me stupid i do not see it
I i did put a space and the Comma
And the sudmenu are still not going gray
CMenu* pMenu = GetParent()->GetMenu();
CMenu* submenu = pMenu->GetSubMenu(0);submenu->EnableMenuItem(ID_SORT_MANAGER, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
submenu->EnableMenuItem(ID_SORT_DEPARTMENT, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
GetParent()->DrawMenuBar(); -
December 4, 2008 at 1:49 pm #2991731
Use the Force – jean_guy_bureau@…
by older mycroft · about 14 years, 2 months ago
In reply to ok just call me stupid i do not see it
I’m going to give you a simple piece of advice…
If you are incapable of viewing 2 pieces of code side-by-side (or one above the other), making adjustments as you go, you will never make it to the point of achievement.
I gave you the chance, you DID make amendments, never admitted them then maintained there was no difference. You can’t do that if I’m snap-shotting what you post.
READ the code – don’t just look at it. 😉
-
December 4, 2008 at 1:58 pm #2991728
WHAT is the possible difference between …
by older mycroft · about 14 years, 2 months ago
In reply to ok just call me stupid i do not see it
“MF_BYCOMMAND”
&
“MF_BYPOSITION”
…so why the juxtapose?
You changed the code… 😉
-
December 4, 2008 at 2:09 pm #2991726
New Brunswick, NJ, USA – And I’m supposed to guess ?…
by older mycroft · about 14 years, 2 months ago
In reply to The clue was in the TITLE of the last entry …
That you are NOT American – that you are French Canadian ????
That’s like asking me to guess the skin colour of the Invisible Man!! 😉
-
-
-
December 4, 2008 at 2:25 pm #2991718
HELP!! Je suis non parl? Canadien Francais! ….
by older mycroft · about 14 years, 2 months ago
In reply to c++ help with EnableMenuItem
Moi non plus!! … 😉
Particularment – ‘sarcasme’ !
-
December 4, 2008 at 8:44 pm #2989941
Ce n’est pas correct.
by jamesrl · about 14 years, 2 months ago
In reply to HELP!! Je suis non parl? Canadien Francais! ….
Tu ne parle pas la Francais Canadian, moi non plus!
James
-
-
December 4, 2008 at 5:34 pm #2991670
Some advice you got 6 months ago from a fellow peer …
by older mycroft · about 14 years, 2 months ago
In reply to c++ help with EnableMenuItem
http://techrepublic.com.com/5208-6230-0.html?forumID=101&threadID=267756&messageID=2536131
..I’m not going to spoon-feed you the answer, because if you can’t improve your analytical skills, you will inevitably arrive at Dead End Central. 😉 🙂
-
-
AuthorReplies