Re: How do I gray out system tray menu entries?
- From: "AliR \(VC++ MVP\)" <AliR@xxxxxxxxxxxxx>
- Date: Tue, 10 Apr 2007 12:51:44 -0500
"Ajay Kalra" <ajaykalra@xxxxxxxxx> wrote in message
news:1176216921.266708.38880@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 10, 10:17 am, "Paco" <paco_be...@xxxxxxxxx> wrote:
I want the ability to gray out entries in my system tray menu.
My system tray implementation call a function every time the right mouse
button "up" is detected. This function builds the menu and activates it.
To
create the menu entries I use code lines like this:
::AppendMenu(p_HMenu, MF_STRING, ID_MENU_CONFIGURATION,
"&Configuration..." );
When I want a gray disabled entry, I tried changing code to this:
::AppendMenu(p_HMenu, MF_STRING | MF_GRAYED, ID_MENU_CONFIGURATION,
"&Configuration..." );
It doesn't work. The gray specification seems to be ignored.
How do I get gray menu entries.
It should have worked. Try using EnableMenuItem. I am assuming this
menu items has nothing to do with MFC menu item which is enable/
disable using ON_UPDATE_COMMAND_UI mechanism.
---
Ajay
It would work only if there is no ON_COMMAND handler for
ID_MENU_CONFIGURATION otherwise the MF_GRAYED will get overwritten by the
framework.
AliR.
.
- Follow-Ups:
- Re: How do I gray out system tray menu entries?
- From: Ajay Kalra
- Re: How do I gray out system tray menu entries?
- References:
- How do I gray out system tray menu entries?
- From: Paco
- Re: How do I gray out system tray menu entries?
- From: Ajay Kalra
- How do I gray out system tray menu entries?
- Prev by Date: Re: Are _T() and TEXT() macros equivalent?
- Next by Date: Re: Timers
- Previous by thread: Re: How do I gray out system tray menu entries?
- Next by thread: Re: How do I gray out system tray menu entries?
- Index(es):