Article View: borland.public.cppbuilder.nativeapi
Article #14005Re: Tray Icon + popup menu
From: Bob Gonder
Date: Thu, 04 Sep 2003 14:12
Date: Thu, 04 Sep 2003 14:12
20 lines
1646 bytes
1646 bytes
Boguslaw Fries wrote:
>void TForm1::AddTrayIcon ( HWND Handle, HWND IconHandle )
>{
>NOTIFYICONDATA icondata;
>
> icondata.hWnd = Handle;
> icondata.uCallbackMessage = WM_RBUTTONUP;
> icondata.uFlags = NIF_MESSAGE | NIF_ICON | NIF_TIP;
> Shell_NotifyIcon ( NIM_ADD, &icondata );
>}
>
>And finally - how to assotiate this Icon withs this Popup menu ( when I
>righ click over the icon )
Whoever owns "Handle" will get all messages that are sent to the icon.
(Mouse moves, clicks, etc).
Handle's message loop must check for (I suppose) WM_RBUTTONUP and pop
up the menu.
See "Creating a Shortcut Menu" for how to pop up the menu.
Technical Details
Message-ID:
<58helvsfjqursja10c2h9i75ofblfj57hv@4ax.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3f57393f@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,c117fcea15cf7df7 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-09-04 07:18:48 PST From: Bob Gonder <notbg@notmindspring.invalid> Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Tray Icon + popup menu Date: Thu, 04 Sep 2003 07:12:46 -0700 Organization: MindSpring Enterprises, Inc. Reply-To: notbg@notmindspring.invalid Message-ID: <58helvsfjqursja10c2h9i75ofblfj57hv@4ax.com> References: <3f57393f@newsgroups.borland.com> X-Newsreader: Forte Agent 1.91/32.564 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 67.31.164.67 X-Trace: newsgroups.borland.com 1062684766 67.31.164.67 (4 Sep 2003 07:12:46 -0700) Lines: 22 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail