Article View: borland.public.cppbuilder.nativeapi
Article #5459Re: Icon Tray Popup Menu Bug
From: Colin B Maharaj
Date: Wed, 17 Aug 2005 23:48
Date: Wed, 17 Aug 2005 23:48
39 lines
2116 bytes
2116 bytes
Hi Michel, thanks for the response - Actually this is exactly what I did
but now in BCB6 it has no effect.
I Put it in .....
void __fastcall TForm1::WMTrayNotify(TMessage &Msg)
{
///////
}
the header looks like this....
private:
void __fastcall WMTrayNotify(TMessage &Msg);
public: // User declarations
__fastcall TForm1(TComponent* Owner);
BEGIN_MESSAGE_MAP
MESSAGE_HANDLER(WM_TRAYNOTIFY, TMessage, WMTrayNotify)
END_MESSAGE_MAP(TForm)
Michel Leunen wrote:
> Colin B Maharaj wrote:
>
>> Hi all remember that right click popup menu bug where if you "popup" a
>> menu in the icon tray and do not do anything - it stays up. There were
>> fixes for it in BCB 3 but I cannot get it working working in BCB6,
>> since the icon tray support is much "better" and have little control
>> using the WinApi..
>
>
> Do something like this:
>
> POINT pt;
> GetCursorPos(&pt);
> SetForegroundWindow(WndHandle);
> FPopupMenu->Popup(pt.x,pt.y);
> PostMessage(WndHandle,WM_NULL,0,0);
>
> Michel
Technical Details
Message-ID:
<4303ccb7@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.mesh.ad.jp!newsfeed2.kddnet.ad.jp!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<430306ea$1@newsgroups.borland.com> <43037e37$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,9fcf3cd5c7af18de X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 17 Aug 2005 19:48:26 -0400 From: Colin B Maharaj <noreply@myhost.com> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040927 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Icon Tray Popup Menu Bug References: <430306ea$1@newsgroups.borland.com> <43037e37$1@newsgroups.borland.com> In-Reply-To: <43037e37$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 200.108.29.95 Message-ID: <4303ccb7@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1124322487 200.108.29.95 (17 Aug 2005 16:48:07 -0700) Lines: 39 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed.mesh.ad.jp!newsfeed2.kddnet.ad.jp!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail