Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: beaver on December 28, 2002, 03:02 PM

Title: Minimizing to system tray
Post by: beaver on December 28, 2002, 03:02 PM
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++?
Title: Re: Minimizing to system tray
Post by: Eibro on December 28, 2002, 05:34 PM
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
Title: Re: Minimizing to system tray
Post by: Mesiah / haiseM on December 28, 2002, 05:58 PM
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.
Title: Re: Minimizing to system tray
Post by: Zakath on December 30, 2002, 07:34 AM
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.
Title: Re: Minimizing to system tray
Post by: ILurker on February 09, 2003, 05:43 AM
here is an easy ocx to use,
http://www.geocities.com/us_lurker/FlshTry.zip
Title: Re: Minimizing to system tray
Post by: ILurker on February 09, 2003, 03:21 PM
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
Title: Re: Minimizing to system tray
Post by: Zakath on February 10, 2003, 06:49 AM
Did you not note that he's using C++?

Your VB source isn't very useful in that language.
Title: Re: Minimizing to system tray
Post by: ILurker on February 10, 2003, 10:17 AM
its not c++.... check again
Title: Re: Minimizing to system tray
Post by: Yoni on February 10, 2003, 10:38 AM
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...
Title: Re: Minimizing to system tray
Post by: ILurker on February 10, 2003, 10:41 AM
Quoteits not c++.... check again

Hmm, thought he was talking about my post
Title: Re: Minimizing to system tray
Post by: Banana fanna fo fanna on February 11, 2003, 03:11 PM
owned again.