Click here to Skip to main content
15,884,629 members
Articles / Mobile Apps / Windows Mobile

Tray Calendar

Rate me:
Please Sign up or sign in to vote.
4.81/5 (25 votes)
2 Aug 2003CPOL 302K   7.4K   91  
A simple application that places a date in the system tray
// 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

/////////////////////////////////////////////////////////////////////////////
// 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

#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"
    "#ifdef _WIN32\r\n"
    "LANGUAGE 9, 1\r\n"
    "#pragma code_page(1252)\r\n"
    "#endif\r\n"
    "#include ""res\\TrayCalendar.rc2""  // non-Microsoft Visual C++ edited resources\r\n"
    "#include ""afxres.rc""         // Standard components\r\n"
    "#endif\0"
END

#endif    // APSTUDIO_INVOKED


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

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO 
BEGIN
    IDD_ABOUTBOX, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 181
        TOPMARGIN, 7
        BOTTOMMARGIN, 106
    END
END
#endif    // APSTUDIO_INVOKED


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

IDD_ABOUTBOX DIALOGEX 0, 0, 188, 113
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About Tray Calender"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,15,17,20,20
    CTEXT           "TrayCalendar Version 2.2",IDC_STATIC,42,10,94,8,
                    SS_NOPREFIX
    CTEXT           "Copyright � 1997-2002",IDC_STATIC,48,37,78,8
    DEFPUSHBUTTON   "OK",IDOK,149,22,32,14,WS_GROUP
    CTEXT           "Written by Chris Maunder",IDC_STATIC,45,23,91,10
    LTEXT           "Disclaimer: I accept no responsibility if this thing turns your computer into mush. It's provided ""as is"", but at least it's free. If you like it or have any comments, an email would be great.",
                    IDC_STATIC,10,55,170,39
    CTEXT           "cmaunder@mail.com",IDC_HYPERLINK,7,94,174,12,
                    SS_CENTERIMAGE
END

IDD_OPTIONS_DIALOG DIALOG  0, 0, 172, 85
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_POPUP | WS_CAPTION | 
    WS_SYSMENU
CAPTION "Tray Calender Options"
FONT 8, "MS Sans Serif"
BEGIN
    EDITTEXT        IDC_SHUFFLE_DELAY,65,10,28,12,ES_AUTOHSCROLL
    CONTROL         "Spin1",IDC_AUTOSHUFFLE_SPIN,"msctls_updown32",
                    UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | 
                    UDS_ARROWKEYS,91,11,11,10
    CONTROL         "Disable Auto-shuffle",IDC_AUTO_SHUFFLE,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,21,27,84,10
    CONTROL         "Disable date change checks",IDC_CHECK_DATE,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,21,41,123,10
    DEFPUSHBUTTON   "OK",IDOK,20,59,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,102,59,50,14
    LTEXT           "Auto-shuffle after",IDC_AS_STATIC,21,11,43,8
    LTEXT           "seconds after start",IDC_ASS_STATIC,99,11,66,8
END


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

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON                    "res\\TrayDay.ico"
IDI_ICON9               ICON                    "res\\icon9.ico"
IDI_ICON8               ICON                    "res\\icon8.ico"
IDI_ICON7               ICON                    "res\\icon7.ico"
IDI_ICON6               ICON                    "res\\icon6.ico"
IDI_ICON5               ICON                    "res\\icon5.ico"
IDI_ICON4               ICON                    "res\\icon4.ico"
IDI_ICON31              ICON                    "res\\icon31.ico"
IDI_ICON30              ICON                    "res\\icon30.ico"
IDI_ICON3               ICON                    "res\\icon3.ico"
IDI_ICON29              ICON                    "res\\icon29.ico"
IDI_ICON28              ICON                    "res\\icon28.ico"
IDI_ICON27              ICON                    "res\\icon27.ico"
IDI_ICON26              ICON                    "res\\icon26.ico"
IDI_ICON25              ICON                    "res\\icon25.ico"
IDI_ICON24              ICON                    "res\\icon24.ico"
IDI_ICON23              ICON                    "res\\icon23.ico"
IDI_ICON22              ICON                    "res\\icon22.ico"
IDI_ICON21              ICON                    "res\\icon21.ico"
IDI_ICON20              ICON                    "res\\icon20.ico"
IDI_ICON2               ICON                    "res\\icon2.ico"
IDI_ICON19              ICON                    "res\\icon19.ico"
IDI_ICON18              ICON                    "res\\icon18.ico"
IDI_ICON17              ICON                    "res\\icon17.ico"
IDI_ICON16              ICON                    "res\\icon16.ico"
IDI_ICON15              ICON                    "res\\icon15.ico"
IDI_ICON14              ICON                    "res\\icon14.ico"
IDI_ICON13              ICON                    "res\\icon13.ico"
IDI_ICON12              ICON                    "res\\icon12.ico"
IDI_ICON11              ICON                    "res\\icon11.ico"
IDI_ICON10              ICON                    "res\\icon10.ico"
IDI_ICON1               ICON                    "res\\icon1.ico"

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

IDR_MAINFRAME MENU 
BEGIN
    POPUP "&File"
    BEGIN
        MENUITEM "E&xit",                       ID_APP_EXIT
    END
    POPUP "&Help"
    BEGIN
        MENUITEM "&About TrayCal...",           ID_APP_ABOUT
    END
END

IDR_POPUP_MENU MENU 
BEGIN
    POPUP "POPUP_MENU"
    BEGIN
        MENUITEM "&About TrayCalendar...",      ID_APP_ABOUT
        MENUITEM SEPARATOR
        MENUITEM "Options...",                  ID_TRAYCAL_OPTIONS
        MENUITEM "Reshuffle",                   ID_TRAYCAL_SHUFFLE
        MENUITEM "Check Date",                  ID_CHECK_DATE
        MENUITEM SEPARATOR
        MENUITEM "E&xit",                       ID_APP_EXIT
    END
END


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

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 2,1,0,0
 PRODUCTVERSION 2,1,0,0
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x1L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "0c0904b0"
        BEGIN
            VALUE "FileDescription", "Displays the date in the system tray."
            VALUE "FileVersion", "2.1"
            VALUE "InternalName", "TrayCalendar"
            VALUE "LegalCopyright", "Copyright � 1997-2000"
            VALUE "OriginalFilename", "TrayCalendar.exe"
            VALUE "ProductName", "TrayCalendar Application"
            VALUE "ProductVersion", "2.1"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0xc09, 1200
    END
END


/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//

IDB_SPLASH              BITMAP                  "Splsh16.bmp"

/////////////////////////////////////////////////////////////////////////////
//
// Cursor
//

IDC_MYHAND              CURSOR                  "res\\cursor1.cur"

/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE 
BEGIN
    IDR_MAINFRAME           "TrayCalendar\n\n\n\n\nTrayCalendar.Document\nTrayCa Document"
END

STRINGTABLE 
BEGIN
    AFX_IDS_APP_TITLE       "TrayCalendar"
    AFX_IDS_IDLEMESSAGE     "Ready"
END

STRINGTABLE 
BEGIN
    ID_APP_ABOUT            "Display program information, version number and copyright\nAbout"
    ID_APP_EXIT             "Quit the application; prompts to save documents\nExit"
END

STRINGTABLE 
BEGIN
    ID_CHECK_DATE           "Checks the date to ensure we have the correct date displayed."
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)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "res\TrayCalendar.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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder CodeProject
Canada Canada
Chris Maunder is the co-founder of CodeProject and ContentLab.com, and has been a prominent figure in the software development community for nearly 30 years. Hailing from Australia, Chris has a background in Mathematics, Astrophysics, Environmental Engineering and Defence Research. His programming endeavours span everything from FORTRAN on Super Computers, C++/MFC on Windows, through to to high-load .NET web applications and Python AI applications on everything from macOS to a Raspberry Pi. Chris is a full-stack developer who is as comfortable with SQL as he is with CSS.

In the late 1990s, he and his business partner David Cunningham recognized the need for a platform that would facilitate knowledge-sharing among developers, leading to the establishment of CodeProject.com in 1999. Chris's expertise in programming and his passion for fostering a collaborative environment have played a pivotal role in the success of CodeProject.com. Over the years, the website has grown into a vibrant community where programmers worldwide can connect, exchange ideas, and find solutions to coding challenges. Chris is a prolific contributor to the developer community through his articles and tutorials, and his latest passion project, CodeProject.AI.

In addition to his work with CodeProject.com, Chris co-founded ContentLab and DeveloperMedia, two projects focussed on helping companies make their Software Projects a success. Chris's roles included Product Development, Content Creation, Client Satisfaction and Systems Automation.

Comments and Discussions