Hello,

I'm building an application in C/C++ in WindowsCE.Net 4.2 and would like
to add an icon to the system tray.
I know that the Shell_NotifyIcon is able to do that. However, looking at
the PBLibrary documentation, I couldn't find out how should I set the
NOTIFYICONDATA.hIcon field (which should contain a handle to the icon to
add, modify, or delete).

What type of handle is this? Do I have to open an icon file using
CreateFile and use the resulting file hadle (I don't think so)?
How can I obtain the handle to the icon?

Thank you in advance.
Joao Barreto

Re: Shell_NotifyIcon: how to obtain handle to the icon? by Paul

Paul
Tue Feb 10 17:05:26 CST 2004

It's a handle to an icon, oddly enough. Try LoadImage() on a 16x16 icon.

Paul T.

"Joao Pedro Barreto" <nospam@nospam> wrote in message
news:%23UJzaUC8DHA.3360@tk2msftngp13.phx.gbl...
> Hello,
>
> I'm building an application in C/C++ in WindowsCE.Net 4.2 and would like
> to add an icon to the system tray.
> I know that the Shell_NotifyIcon is able to do that. However, looking at
> the PBLibrary documentation, I couldn't find out how should I set the
> NOTIFYICONDATA.hIcon field (which should contain a handle to the icon to
> add, modify, or delete).
>
> What type of handle is this? Do I have to open an icon file using
> CreateFile and use the resulting file hadle (I don't think so)?
> How can I obtain the handle to the icon?
>
> Thank you in advance.
> Joao Barreto
>



Re: Shell_NotifyIcon: how to obtain handle to the icon? by bill

bill
Tue Feb 10 17:37:37 CST 2004

Also, see the shell source for examples. Its done from the shell for the
power icons.

"Paul G. Tobey [eMVP]" <ptobey_no_spam@instrument_no_spam.com> wrote in
message news:OqUoepC8DHA.2460@TK2MSFTNGP09.phx.gbl...
> It's a handle to an icon, oddly enough. Try LoadImage() on a 16x16 icon.
>
> Paul T.
>
> "Joao Pedro Barreto" <nospam@nospam> wrote in message
> news:%23UJzaUC8DHA.3360@tk2msftngp13.phx.gbl...
> > Hello,
> >
> > I'm building an application in C/C++ in WindowsCE.Net 4.2 and would like
> > to add an icon to the system tray.
> > I know that the Shell_NotifyIcon is able to do that. However, looking at
> > the PBLibrary documentation, I couldn't find out how should I set the
> > NOTIFYICONDATA.hIcon field (which should contain a handle to the icon to
> > add, modify, or delete).
> >
> > What type of handle is this? Do I have to open an icon file using
> > CreateFile and use the resulting file hadle (I don't think so)?
> > How can I obtain the handle to the icon?
> >
> > Thank you in advance.
> > Joao Barreto
> >
>
>