Click here to Skip to main content
12,357,929 members (74,603 online)
Click here to Skip to main content

Stats

93.2K views
3.2K downloads
46 bookmarked
Posted

Tray Icon Class with Icon Animation Abilities

, 14 Dec 2003
A class which makes tray icons management and animation really easy
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Ukrainian resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_UKR)
#ifdef _WIN32
LANGUAGE LANG_UKRAINIAN, SUBLANG_DEFAULT
#pragma code_page(1251)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE 
BEGIN
    "#include ""afxres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE 
BEGIN
    "#define _AFX_NO_SPLITTER_RESOURCES\r\n"
    "#define _AFX_NO_OLE_RESOURCES\r\n"
    "#define _AFX_NO_TRACKER_RESOURCES\r\n"
    "#define _AFX_NO_PROPERTY_RESOURCES\r\n"
    "\r\n"
    "#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#include ""res\\akTrayIconDemo.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED

#endif    // Ukrainian resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_SMILE               ICON                    "res\\smile.ico"
IDR_MAINFRAME           ICON                    "res\\akTrayIconDemo.ico"
IDI_HOURGLASS           ICON                    "res\\hourglass.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_AKTRAYICONDEMO_DIALOG DIALOGEX 0, 0, 278, 122
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | 
    WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "CakTrayIcon class demo"
FONT 8, "MS Shell Dlg", 0, 0, 0x1
BEGIN
    LTEXT           "&Tray icon tip:",IDC_STATIC,7,7,43,8
    EDITTEXT        IDC_ED_TIP,59,7,154,14,ES_AUTOHSCROLL
    PUSHBUTTON      "C&hange",IDC_BTN_CHANGE,221,7,50,14
    LTEXT           "Balloon &info:",IDC_STATIC,7,30,40,8
    EDITTEXT        IDC_ED_INFO,59,30,84,14,ES_AUTOHSCROLL
    LTEXT           "Ti&meout:",IDC_STATIC,151,30,29,8
    EDITTEXT        IDC_ED_TIMEOUT,188,30,25,14,ES_AUTOHSCROLL | ES_NUMBER
    LTEXT           "Balloon tit&le:",IDC_STATIC,7,53,40,8
    EDITTEXT        IDC_ED_INFO_TITLE,59,53,84,14,ES_AUTOHSCROLL
    LTEXT           "Typ&e:",IDC_STATIC,151,53,20,8
    COMBOBOX        IDC_CB_INFO_TYPE,176,53,37,47,CBS_DROPDOWNLIST | 
                    WS_VSCROLL | WS_TABSTOP
    PUSHBUTTON      "&Show",IDC_BTN_SHOW,221,30,50,14
    LTEXT           "&Animation tip:",IDC_STATIC,7,76,45,8
    EDITTEXT        IDC_ED_ANIM_TIP,59,76,154,14,ES_AUTOHSCROLL
    PUSHBUTTON      "Animate i&con",IDC_BTN_ANIMATE,221,76,50,14
    PUSHBUTTON      "Close",IDCANCEL,221,99,50,16
END


/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904e4"
        BEGIN
            VALUE "CompanyName", "TODO: <Company name>"
            VALUE "FileDescription", "TODO: <File description>"
            VALUE "FileVersion", "1.0.0.1"
            VALUE "InternalName", "akTrayIconDemo.exe"
            VALUE "LegalCopyright", "TODO: (c) <Company name>.  All rights reserved."
            VALUE "OriginalFilename", "akTrayIconDemo.exe"
            VALUE "ProductName", "TODO: <Product name>"
            VALUE "ProductVersion", "1.0.0.1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1252
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO 
BEGIN
    IDD_AKTRAYICONDEMO_DIALOG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 271
        VERTGUIDE, 59
        VERTGUIDE, 143
        VERTGUIDE, 151
        VERTGUIDE, 188
        VERTGUIDE, 213
        VERTGUIDE, 221
        TOPMARGIN, 7
        BOTTOMMARGIN, 115
        HORZGUIDE, 30
        HORZGUIDE, 53
        HORZGUIDE, 76
        HORZGUIDE, 99
    END
END
#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// RT_MANIFEST
//

IDR_MANIFEST            RT_MANIFEST             "res\\akTrayIconDemo.manifest"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog Info
//

IDD_AKTRAYICONDEMO_DIALOG DLGINIT
BEGIN
    IDC_CB_INFO_TYPE, 0x403, 5, 0
0x6f4e, 0x656e, "\000" 
    IDC_CB_INFO_TYPE, 0x403, 6, 0
0x7245, 0x6f72, 0x0072, 
    IDC_CB_INFO_TYPE, 0x403, 5, 0
0x6e49, 0x6f66, "\000" 
    0
END


/////////////////////////////////////////////////////////////////////////////
//
// Menu
//

IDR_TRAYMENU MENU 
BEGIN
    POPUP "Popup"
    BEGIN
        MENUITEM "Some menu item1",             ID_POPUP_SOMEMENUITEM1
        MENUITEM "Some menu item2",             ID_POPUP_SOMEMENUITEM2
        MENUITEM "Some menu item3",             ID_POPUP_SOMEMENUITEM3
    END
END

#endif    // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
LANGUAGE 9, 1
#pragma code_page(1252)
#include "res\akTrayIconDemo.rc2"  // non-Microsoft Visual C++ edited resources
#include "afxres.rc"         // Standard components
#endif

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Alex Kolesnichenko
Software Developer (Senior)
United States United States
Started professional career in software development back in 2000, in Ukraine. Founder and owner of a boutique software company called ByteGems.com Software. Worked for 6 years at w2bi, Inc in New Jersey USA, currently work in a large multinational company based in Redmond, WA.

My buzzwords at the moment: .NET, C#, ASP.NET, MVC, LINQ, TypeScript, JavaScript, AngularJS, HTML, JSON, services.

Still buzzing: C++, Win32, ATL, MFC, SQL, WinForms, WebForms, EF, Sockets, TCP/IP, Remoting.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160621.1 | Last Updated 15 Dec 2003
Article Copyright 2003 by Alex Kolesnichenko
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid