?
Solved

What should be icon size that goes to systray

Posted on 2003-11-16
5
Medium Priority
?
347 Views
Last Modified: 2010-04-02
I want to put an icon in systray, but I don't know what size icon should be?
0
Comment
Question by:amakalski
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 

Expert Comment

by:ks5d
ID: 9761400
OK, this isn't really a C++ question, but here goes:

from: http://www.techtv.com/callforhelp/howto/story/0,24330,3332137,00.html

"Icons come in three different sizes: 16x16, 32x32, and 48x48. 32x32 is the default, the size you see on your desktop. To create icons for your system tray or taskbar, go with 16x16."

Also, more to the programming interest of this board, here's an MSDN article describing how to create a system tray application:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp06102002.asp
0
 

Author Comment

by:amakalski
ID: 9764734
This type of question is difficult to find section for.
0
 

Author Comment

by:amakalski
ID: 9767644
I created 16x16 pixels icon, it looks ok in Resource Editor
but on systray it looks like it was squeezed a bit. Is it normal ?
0
 

Accepted Solution

by:
ks5d earned 200 total points
ID: 9768445

       Are you sure that the program isn't inadvertantly inserting a 32 x 32 version of the icon into the system tray?  What does your code look like?

Check out:
http://www.codeguru.com/mfc/comments/9525.shtml

    - Ken
0
 

Author Comment

by:amakalski
ID: 9773120
I used
nid.hIcon = AfxGetApp()->LoadIcon(IDI_SYSTEMTRAY_ICON2);
and I deleted 32x32 version from resource, but icon still looked bad.
I noticed that http://www.codeguru.com/mfc/comments/9525.shtml
uses different icon load method, so I tried using
nid.hIcon = (HICON)::LoadImage(AfxGetResourceHandle(), MAKEINTRESOURCE(IDI_SYSTEMTRAY_ICON2), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
Now the icon looks exactly as original.
Thank you.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question