• Welcome to Valhalla Legends Archive.
 

Minimizing to system tray

Started by beaver, December 28, 2002, 03:02 PM

Previous topic - Next topic

beaver

I got a couple of questions, I'm making a bot in C++ and I want it to minimize to the System Tray.  Do I have to resize my icon? Or does Windows do it on its own?  And if not what size does it have to be?  And what programs do you use to build interfaces in C++?

Eibro

#1
You'll need to use the Shell_NotifyIcon() function included in the Win32 API (assuming you're coding for windows..)
I believe the icon has to be 16*16.

This is what MSDN has to say about the function.. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/reference/functions/shell_notifyicon.asp
Eibro of Yeti Lovers.

Mesiah / haiseM

#2
im almost positive shell_notifyicon() will let you use any size image, as long as its a proper format.

it should do the resizing by itself, im almost positive.
]HighBrow Innovations
Coming soon...

AIM Online Status: 

Zakath

#3
Yes, it'll resize any icon you want to use - although depending on how detailed the icon is, you may want to make a smaller version because it can get distorted.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

ILurker

#4

ILurker

#5
Nevermind the above post, here is a very easy source to use
- when you left click on the icon, a menu appears for "close/restore/or whatever you put"

- when you minimize your bot it goes to system tray

http://www.geocities.com/us_lurker/Systray.zip

Zakath

#6
Did you not note that he's using C++?

Your VB source isn't very useful in that language.
Quote from: iago on February 02, 2005, 03:07 PM
Yes, you can't have everybody...contributing to the main source repository.  That would be stupid and create chaos.

Opensource projects...would be dumb.

ILurker

#7
its not c++.... check again

Yoni

#8
QuoteI got a couple of questions, I'm making a bot in C++ and I want it to minimize to the System Tray.  Do I have to resize my icon? Or does Windows do it on its own?  And if not what size does it have to be?  And what programs do you use to build interfaces in C++?
He only said C++ twice...

ILurker

#9
Quoteits not c++.... check again

Hmm, thought he was talking about my post

Banana fanna fo fanna

#10
owned again.