🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: system tray balloon notifcation issue

#473
From: Remy Lebeau (TeamB)
Date: Wed, 12 Mar 2008 16:50
37 lines
2030 bytes
"Mike Collins" <its@TheBottomOfThePost> wrote in message 
news:47d7e8aa$1@newsgroups.borland.com...

> I resolved it by setting the uFlah i.e.
> uFlags = NIF_INFO | NIF_ICON;

You have to do that anyway.  NIF_INFO activates the use of the 
balloon-related fields, whereas NIF_ICON activates the use of the hIcon 
field.  You can't use hIcon without specifying the NIF_ICON flag.

> Secondly, when i do this, it causes the system tray icon to change as 
> well.

Because you are specifying a new icon for it to display.

> Finally, when my application first starts up, i still get the wrong
> icon being displayed in the balloon.

Then you are probably loading the icon wrong to begin with.

> My code looks like this:

What version of BCB are you using?  What value are you setting for the 
cbSize field?

>         HICON hIcon   = (HICON)::LoadImage(HInstance, 
> MAKEINTRESOURCE(101), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);

How are you including that icon in the project to begin with?

>         bRtn = (bool)Shell_NotifyIcon(NIM_MODIFY, &nid);

Are you using NIM_ADD first?


Gambit 
Technical Details
Message-ID: <47d809c9$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <47d7e8aa$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,61e4cf3ce8a471e2
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <47d7e8aa$1@newsgroups.borland.com>
Subject: Re: system tray balloon notifcation issue
Date: Wed, 12 Mar 2008 09:50:31 -0700
Lines: 39
Organization: Lebeau Software
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 207.178.157.90
Message-ID: <47d809c9$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1205340617 207.178.157.90 (12 Mar 2008 09:50:17 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail