Thread View: comp.windows.ms.programmer
3 messages
3 total messages
Started by TC
Mon, 16 Aug 1999 00:00
Popup menu
Author: TC
Date: Mon, 16 Aug 1999 00:00
Date: Mon, 16 Aug 1999 00:00
10 lines
1265 bytes
1265 bytes
I have made a programm with an icon in the system tray. This icon is created in a CFrameWnd. When I click right on the taskbar i want to display a popupmenu with this code pMenu->TrackPopupMenu(0,x,y,AfxGetMainWnd(),NULL) The PopupMenu is diplayed but all items are disabled and i don't know why ? Anyhelp could be very appreciated
Re: Popup menu
Author: Alex Marbus
Date: Tue, 17 Aug 1999 00:00
Date: Tue, 17 Aug 1999 00:00
29 lines
1442 bytes
1442 bytes
Hi,
In the OnUpdatehandler of the item (for example item called 'About'),
please add 'pCmdUI->Enable(true)'
For example:
void CMyView::OnUpdateAbout(CCmdUI* pCmdUI)
{
pCmdUI->Enable(true);
}
This must work..
On Mon, 16 Aug 1999 17:39:54 -0400, "TC" <t_charle@yahoo.com> wrote:
>I have made a programm with an icon in the system tray. This icon is created
>in a CFrameWnd.
>When I click right on the taskbar i want to display a popupmenu with this
>code
>
>pMenu->TrackPopupMenu(0,x,y,AfxGetMainWnd(),NULL)
>
>The PopupMenu is diplayed but all items are disabled and i don't know why ?
>
>Anyhelp could be very appreciated
>
>
>
>
Re: Popup menu
Author: David Lowndes
Date: Tue, 17 Aug 1999 00:00
Date: Tue, 17 Aug 1999 00:00
18 lines
1436 bytes
1436 bytes
>I have made a programm with an icon in the system tray. This icon is created >in a CFrameWnd. >When I click right on the taskbar i want to display a popupmenu with this >code > >pMenu->TrackPopupMenu(0,x,y,AfxGetMainWnd(),NULL) > >The PopupMenu is diplayed but all items are disabled and i don't know why ? It's probably because you've not yet created any handlers for the menu commands. By default MFC disables menu items that don't have a command handler. Dave -- My address is altered to discourage junk mail. Please post responses to the newsgroup thread, there's no need for follow-up email copies.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads