473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Using Window's System Tray Icon

When I add a USB key, system tray icon on Windows XP shows USB icon. It also
shows icon that can be used to "Safely Remove Hardware". I would like to use
this icon in one of my Visual C++ application.

All I could find is that I can use LoadStandardIcon() call in Windows to
expose very few Standard icons, which includes default application icon,
information icon, warning icon, error icon, question mark icon and
exclamation point icon.

I didn’t see any way to use other Windows icons. If anyone knows a way, I
would be interested in getting a solution. Thank you.
--
Asif
Aug 1 '06 #1
2 1920
When I add a USB key, system tray icon on Windows XP shows USB icon. It
also
shows icon that can be used to "Safely Remove Hardware". I would like to
use
this icon in one of my Visual C++ application.

All I could find is that I can use LoadStandardIcon() call in Windows to
expose very few Standard icons, which includes default application icon,
information icon, warning icon, error icon, question mark icon and
exclamation point icon.

I didn't see any way to use other Windows icons. If anyone knows a way, I
would be interested in getting a solution. Thank you.
Undoubtedly there is a better solution for this, but this is what I do when
I want to use specific icons.

make a screenshot of the desktop when the desired icon is visible.
Then paste it in mspaint, set the zoom to large, and then select and copy a
32x32 bit region.

Then, in a VS project, create a new icon resource and paste the copied
bitmap inside.
The use that in the project.

It may be a bit clunky, but it works.

--

Kind regards,
Bruno van Dooren
br**********************@hotmail.com
Remove only "_nos_pam"
Aug 1 '06 #2
"Bruno van Dooren [MVP VC++]" <br**********************@hotmail.comwrote
in message news:OR**************@TK2MSFTNGP03.phx.gbl...
>When I add a USB key, system tray icon on Windows XP shows USB icon. It
also
shows icon that can be used to "Safely Remove Hardware". I would like to
use
this icon in one of my Visual C++ application.

All I could find is that I can use LoadStandardIcon() call in Windows to
expose very few Standard icons, which includes default application icon,
information icon, warning icon, error icon, question mark icon and
exclamation point icon.

I didn't see any way to use other Windows icons. If anyone knows a way, I
would be interested in getting a solution. Thank you.

Undoubtedly there is a better solution for this, but this is what I do
when I want to use specific icons.

make a screenshot of the desktop when the desired icon is visible.
Then paste it in mspaint, set the zoom to large, and then select and copy
a 32x32 bit region.

Then, in a VS project, create a new icon resource and paste the copied
bitmap inside.
The use that in the project.

It may be a bit clunky, but it works.
But be aware that icons are generally subject to copyright laws, so if you
grab a screenshot of someone else's icon and use it in your program, you may
be crossing the line from a legal standpoint.

-cd
Aug 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Austin | last post by:
I wrote a GUI program with wxPython. In the window, there are 3 attributes on left top. "_" could let the program to minimize to tool bar. I want to let the program minimized to the system tray....
6
by: Action | last post by:
I can add a systray icon in normal windows application... but when i do it in windows service, the systray icon just don't show up is that because i don't have any "component" to contain the...
4
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other...
4
by: Tony Vitonis | last post by:
Hello. I've written an app that I want to "live" in the system tray. I want it to start up with just a tray icon showing, and if the user selects "Settings..." from the icon's context menu, to...
7
by: Mike Eaton | last post by:
Hi All, I have a simple application that allows users to clock in and out and stores the data for use by the payroll department. It spends most of its life as a tray icon and when the user...
4
by: Tom | last post by:
Hello, System tray icon informs users that the apps is running in the background. However, there are instances that the app might crash and after that the app icon in the system tray is still...
3
by: Stanley | last post by:
Hi all the helpful people out there! I want to dectect system tray so that when an icon is added to the tray, it will alert me! Just like the Printer icon appear with someone prints! Thanks in...
1
by: Janiv Ratson | last post by:
Hello, I have an MFC MDI application and a Windows Forms (2.0) Tray Icon application. I want to run a command on the tray application via my MFC application. There is a "Register" context menu...
1
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= | last post by:
Hi, how can i remove/disable the tray icon for the started Express Edition from the system tray. Te icon directs me to the express editons website after clicking on it. I dont want these tray...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.