View Single Post
Old 03-01-2012, 06:11 PM   PM User | #4
crank01
New Coder

 
crank01's Avatar
 
Join Date: Jan 2011
Posts: 96
Thanks: 10
Thanked 2 Times in 2 Posts
crank01 is an unknown quantity at this point
Ok then you'll want to add your application's icon to the system tray. There are plenty of tutorials online to do just that, which to my understanding are relatively simple.

To make your program start as a system tray icon, use the code below:
Code:
    #include <windows.h>
     
    int main()
    {
    HWND hWnd = GetConsoleWindow();
    ShowWindow(hWnd, SW_MINIMIZE);
    // rest of program goes here
Now if the above does not work, I've found some valuable links walking you through how to do this

http://forum.codecall.net/java-tutor...plication.html

http://www.codeproject.com/Articles/...m-in-the-Syste

Below is with the use of a VS addon called Qt, which I just found out is pretty interesting. With it you could make a system tray icon simply by using the tutorial below. I don't expect you to use it, but you may find it enticing to use one day:https://qt-project.org/doc/qt-4.8/desktop-systray.html
__________________
.............-#-----....../|\......----'-'---.......-#-----.
......___ /_______\...//|\\.../_________\.../_______\
...../___\.|[]._.[]|....//|\\....|.A./^\.A.|.....|[] _ []|...._.O,_
.....|"#"|.|..|*|..|...///|\\\...|....|"|....|.....|..|*|..|.....(^).... crank01
crank01 is offline   Reply With Quote