Job Savers System Tray AppWizard

This was the first wizard I ever wrote, basicly it generates an MFC Tray Application, that being a program that sits in the little window down by the clock on windows 95/NT. Its important to note that portions of the generated code in this appwizard are written by and used with permision by CodeGuru Chris Maunder.


This Tray App wizard is pretty simple to use, you only have to privide:
  • Internal name - Which should be unique, and not include spaces.
  • Display name - The string that you see in the list of the services manager.
  • Comments - You have to decide what level of source code comments you want.


To install any wizard, you must simply copy the wizard (any .awx file) it to your devstudio/sharedide/template directory.
Conversly, to remove a wizard, simply deleting the .awx file from your template directory while DevStudio isnt running will do it.

Download System Tray AppWizard - 14.8KB


  • Modifying an application to run in systray

    Posted by Legacy on 02/23/2000 12:00am

    Originally posted by: Richard Madden

    Just wondering how to take a dialog application, and have it sometimes run as an icon in the systray (say, when user minimizes or presses OK)
    If anyone can point me to the location of documentation on this subject, i'd be much appreciated

  • Tray Icon disappearing

    Posted by Legacy on 12/17/1999 12:00am

    Originally posted by: Martin Roth

    Great Work!
    The only problem that I have is that the tray icon
    disappears when NT switches to another desktop, e.g.
    the screensaver, or the log-on screen. When
    the user screen comes back (e.g. the screen saver
    is switched off), the application is still running,
    but the icon is gone :(

    This happens only when I set my own icon. I do this in
    CMainFrame::OnCreate(...) {

    Anybody knows a fix to this? Thanks.

    - Martin

  • Icon Fix

    Posted by Legacy on 08/02/1999 12:00am

    Originally posted by: Laurent Dupuy

    This wizard is wonderful thanks a lot..
    but a little fix...

    The fonction SetStandardIcon
    BOOL CTrayIcon::SetStandardIcon(UINT nIDResource)
    HICON hIcon = LoadIcon(NULL, MAKEINTRESOURCE(nIDResource));

    return SetIcon(hIcon);
    Change to
    BOOL CTrayIcon::SetStandardIcon(UINT nIDResource)
    HICON hIcon = ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(nIDResource));

    return SetIcon(hIcon);

    on my NT

  • Use a 16x16 icon in the system tray

    Posted by Legacy on 07/30/1999 12:00am

    Originally posted by: Todd Barlow

    The code for designating the icon to appear in the system tray takes the 32x32 icon instead of the 16x16 icon.  You might notice some degradation in the image as a result.

    If you want to use a 16x16 icon use LoadImage instead of LoadIcon.

    For example, replace this:

    BOOL CTrayIcon::SetIcon(UINT nIDResource)
    HICON hIcon = AfxGetApp()->LoadIcon(nIDResource);
    return SetIcon(hIcon);

    with this:

    BOOL CTrayIcon::SetIcon(UINT nIDResource)
    HICON hIcon = (HICON)LoadImage(AfxGetInstanceHandle),MAKEINTRESOURCE(nIDResource), IMAGE_ICON,16,16,0);
    return SetIcon(hIcon);

  • Great Job but..

    Posted by Legacy on 06/03/1999 12:00am

    Originally posted by: Nicolas LeBlanc

    Great job for the app wizard, this should save me a lot of work, but it would be nice to have some more details on how to use the Icon...

    That would be nice.

  • declaration fix VC6

    Posted by Legacy on 05/15/1999 12:00am

    Originally posted by: Klaus Melchior

    Following fixed declaration should be in mainfrm.h:

    afx_msg LONG OnTrayNotification(WPARAM wParam, LPARAM lParam);

    and this in TrayIcon.h:

    virtual LRESULT OnTrayNotification(UINT wParam, LONG lParam);

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Today's enterprise datacenter can be one of the most complex business environments with dozens (for smaller business), hundreds (for larger and midsize business), even thousands (for hyperscale businesses) of servers that must be managed and monitored. At this level, just managing the cords can be challenging — let alone keeping up with the growing need for more agility and scalability within the datacenter. Simply put, companies are aggressively looking for less complexity and more agility from their …

  • Featuring Art Schoeller, VP and Principal Analyst, at Forrester Research Live Event Date: November 9, 2016 @ 10 AM PT / 1 PM ET Being "proactive" with your customers is not enough to survive in the market today. The truth is, organizations that understand how to engage customers on their preferred channels will create contextual, and relevant experiences for customers. Plus, they will see the financial impact of nurturing long-term customer loyalty. Join our guest speaker Art Schoeller, VP and Principal …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date