🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6495

Re: Displaying Baloon tips in the taskbar

#6495
From: Vladimir Stefanovic
Date: Wed, 04 May 2005 14:58
75 lines
3376 bytes
Hi,

> Ok, with a TTrayIcon component dropped on the form
> I use the following piece

I never worked with TTrayIcon because I'v heard in this NG
that it's bugy & purely designed. So I suggest you not to waste your
time and start with something that realy works.

For start, go to:
http://www.frasersoft.net/program/index.htm
... and download BCBDEV.ZIP which is a powerful FAQ about
BCB. There you can find a complete skeleton of a tray program.

>            IconData.uID    = 0;     //<---- what should be here?

This is the ID of the icon in tray. I define that ID in the RC file:

--- File.RC (must be added to project) ---
// ...
#define IDC_SER_BALLOON_DISMALL 
31020
// ...

#ifdef RC_INVOKED
   // ...
   IDC_SER_BALLOON_DISMALL   ICON   "dismall.ico"
   // ...
#endif

You must have "dismall.ico" in the File.RC root! Working with RC files
is also described in BCBDEV.ZIP.

I know that this is too much information at one moment, but it's worth 
while.



-- 
Best regards,
Vladimir Stefanovic


"Danila Vershinin" <danprep@yahoo.com> wrote in message 
news:4278dac5@newsgroups.borland.com...
>
> NOTIFYICONDATA IconData;
>            IconData.cbSize = sizeof( NOTIFYICONDATA );
>            IconData.hWnd   = Handle;
>            IconData.uFlags = NIF_MESSAGE|NIF_ICON|NIF_TIP;
>            //IconData.uCallbackMessage = WM_TRAYNOTIFY;  //-<--- callback 
> message, commented cuz I don't have one
>            lstrcpy( IconData.szTip,
>             "This is a test" );
>            IconData.hIcon  = TrayIcon->Handle; // <<<--- by the way what 
> is the difference between TrayIcon->Handle and TrayIcon->GetHandle()? code 
> completeion says that TrayIcon->Handle is of boolean type
> IconData.dwInfoFlags = NIIF_INFO;
>            //IconData.dwInfoFlags = NIF_TIP;
>
>            IconData.uFlags = NIF_INFO;
>            IconData.uTimeout = 15000;
>            StrLCopy( IconData.szInfo, "Test string", 255 );
>            StrLCopy( IconData.szInfoTitle, "Test string 2", 63 );
>            Shell_NotifyIcon( NIM_MODIFY, &IconData );
>
> correct me what I am doing wrong. clicking on the tray icon doesn't bring 
> the balloon tip on.
>
>
> "Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote in message 
> news:4278b6a6@newsgroups.borland.com...
> <. You have to remove some parts, to adjust your needs:
>
> 
Technical Details
Message-ID: <4278e30c@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42762d6f@newsgroups.borland.com> <4278b6a6@newsgroups.borland.com> <4278dac5@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,592a743b28e0761c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Vladimir Stefanovic" <antivari@po.sbb.co.yu>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <42762d6f@newsgroups.borland.com> <4278b6a6@newsgroups.borland.com> <4278dac5@newsgroups.borland.com>
Subject: Re: Displaying Baloon tips in the taskbar
Date: Wed, 4 May 2005 16:58:29 +0200
Lines: 77
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 82.117.212.65
Message-ID: <4278e30c@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115218700 82.117.212.65 (4 May 2005 07:58:20 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail