Click here to Skip to main content
15,886,258 members
Articles / Desktop Programming / WTL
Article

Sticky Notes v. 1.8

Rate me:
Please Sign up or sign in to vote.
4.88/5 (48 votes)
14 Jul 2006CPOL7 min read 836.1K   9.7K   153   171
A WTL replacement for PostIt paper notes.

Announcement

I no longer support the StickyNotes utility on CodeProject. Anyone interested in the latest version, please visit this site[^].

Introduction

At some point, I got tired of sticking PostIt notes around my cubicle, so I decided to come up with a replacement. So here I present the Sticky Notes - free replacement for paper PostIt notes.

Installing the Sticky Notes

Download the StickyNotes.exe from the link above into the directory of your choice.

Usage

Double click on the executable file, and you'll see a Sticky Notes icon in the system tray. When you right-click on the icon, the menu will popup, allowing you to create a new note and to search for an existing one.

Let's say you created a new note and typed in some text. Now, when you click on the icon in the top left corner, the menu will look like this:

Now, you can create a new note, save a note, delete a note, and change the font and background color. Notes will be persisted into the text file which will be created in the root directory of the specified user's profile for WinNT, 2000, XP, or higher, i.e. C:\Documents and Settings\administrator on Win2000. The file name will be constructed by concatenating the user name and the default file name, notes.dat. It will allow several people to have different sets of notes. For Win95, 98, or ME, the file will be created in the same directory where the executable is located.

If you want to search for the note saved previously, select Search from the main menu. Then, enter any string into the Look For field, and click the Find Now button. Double click an the appropriate item from the list-box below. And your note will popup! That's it. Enjoy!

System Requirements

This application was developed using VC++ 6.0 SP4, and tested on WinNT SP6A, 2000, and XP.

Version History

Version 1.0 - February 6, 2002

Version 1.1 - March 8, 2002

  • Fixed: During logging off or system shut down, the application did not persist the saved notes into the text file.
  • Fixed: It was possible to resize the note into a line or a dot and the note would become unrecoverable (pointed out by Paul Howes).
  • Added: A new note can be created when you double click on a tray icon with the left button (suggested by Trond Nilsen).
  • Added: If WinNT, 2000, XP, or higher is running, the file where the notes are saved will be created in the root directory of the specified user's profile. For Win95, 98, or ME, it’ll stay the old way: the file will be created in the same directory where the executable is located (suggested by Philippe Lhoste).

Version 1.2 - September 24, 2002

  • Fixed: When the previously saved note is displayed, the whole text inside the rich-edit control was initially selected.
  • Added: In the search dialog, when the note is selected, it can be displayed by pressing an 'Enter' key.
  • Added: Changed the 'Note' icon to a bitmap, added code to change the background color of the bitmap to be the same as a note's background color.
  • Added: Changed the 'Close' icon to a bitmap, added code to change the background color of the bitmap to be the same as a note's background color.
  • Added: In the search dialog buttons, an edit control and a list-box control now have WinXP-like look.
  • Added: Used Norm Almond's CLabel class for static controls in the search dialog.

Version 1.3 - February 15, 2003

  • Fixed: Removed Derick Cyril Thomas' code.
  • Added: A context menu to the note's rich edit control.
  • Added: A prompt dialog which is displayed when a note's text has been modified, asking an user if the note should be saved.
  • Added: In the search dialog, the listbox was changed to a list control, getting the scrolling for free.
  • Added: Only one instance of the search dialog can now be created.
  • Added: 'New Note' button (allowing to create a new note) in the search dialog.
  • Added: In the search dialog, if the edit control has focus, a search can be performed by pressing the 'Enter' key.
  • Added: A note can be closed by double clicking on a note icon.
  • Added: Support for Windows XP themes on XP - remove the .exe.manifest file if you don't like it.

Version 1.4 - November 3, 2003

  • Fixed: Displayed notes were not saved when the app was being closed.
  • Added: Save a note into a file.
  • Added: When double clicking on a note's title bar, the note would shrink, leaving only a title bar and a date's status bar visible. Clicking the title bar again would open up the note (suggested by Todd Smith).
  • Added: A gradient look to the title bar (used Irek Zielinski's CGradientStatic class ported to WTL).
  • Added: Note can be deleted from the search dialog.

Version 1.5 - January 3, 2004

  • Added: 'Recent Notes' in the system tray context menu - shows last six accessed notes (suggested by Girb and John Drescher).
  • Added: Transparent notes.
  • Added: Print notes.
  • Added: Hyper link recognition.

Version 1.51 - January 26, 2004

  • Fixed: If there are some open notes covered by another window and a user right-clicks the system tray icon, then all open notes move to front (pointed out by tomrowton).
  • Fixed: If there are some open notes covered by another window and a user double-clicks the system tray icon to create a new note, it is created as a background window (pointed out by tomrowton).
  • Fixed: Wrong alpha value used to describe the opacity of the note (pointed out by tomrowton).

Version 1.52 - February 8, 2004

  • Fixed: If there is an open note and it's deleted from the note's menu, it was still being shown in the recent notes list.
  • Added: Menu item 'Set Font' has "..." (suggested by Owen).
  • Added: Date and time are locale specific (suggested by Owen).
  • Added: If there is a note open and a user selects the same note to open in the recent notes list, then the already open note will be activated (suggested by tomrowton).
  • Added: Bring all open notes to front.

Version 1.6 - May 8, 2004

  • Fixed: If you click 'X' in the upper right corner, color is not saved.
  • Added: Change font color.
  • Added: The currently selected color and transparency have a tick mark (suggested by Owen).
  • Added: Changed the way a unique note's ID is generated.
  • Added: Transparency is now persisted (suggested by tomrowton).

Version 1.7 - September 25, 2004

  • Added: Note's title.
  • Added: Pin image (allows pinning a note) indicating if a note is the top most window.
  • Added: Import from a file.

Version 1.8 - October 30, 2004

  • Fixed: Spelling error in the window menu item 'Transparent'.
  • Added: Mouse wheel support.
  • Added: Changed static controls holding 'Close' and 'Pin' images to buttons.
  • Added: When a note becomes inactive, the title bar changes its color to an inactive window caption color and vice versa.
  • Added: Moved the option to insert a title to the window menu (suggested by Tony W).
  • Added: Save a note whenever it loses the focus (suggested by MageLord).
  • Added: Persist all notes to the file when any note is saved.
  • Added: Persist note's position and size (suggested by tomrowton).
  • Added: When an app starts, it displays notes that have been open before the app closed (suggested by MageLord and Tony W.). (So you don't need to remember to open your notes every time you restart or change the user.)

Thanks to:

Terms of use

THIS SOFTWARE IS FREE FOR PERSONAL USE. YOU ARE FREE TO USE THE SOURCE CODE IN YOUR APPLICATIONS: FREEWARE, SHAREWARE, OR COMMERCIAL. YOU ARE NOT ALLOWED TO USE THE DEMO APPLICATION AS A WHOLE IN COMMERCIAL OR SHAREWARE PACKAGES WITHOUT WRITTEN PERMISSION AND PRIOR CONSENT FROM IGOR VIGDORCHIK.

Disclaimer

THIS SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO RESPONSIBILITIES FOR POSSIBLE DAMAGES CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS SOFTWARE.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralRe: Compiled Error Pin
Igor Vigdorchik7-May-03 13:22
Igor Vigdorchik7-May-03 13:22 
GeneralRe: Compiled Error Pin
Val Salamakha30-Jul-03 4:23
Val Salamakha30-Jul-03 4:23 
GeneralFeature Request Pin
Todd Smith7-Mar-03 7:24
Todd Smith7-Mar-03 7:24 
GeneralRe: Feature Request Pin
Igor Vigdorchik7-Mar-03 12:42
Igor Vigdorchik7-Mar-03 12:42 
GeneralRe: Feature Request Pin
Igor Vigdorchik11-Mar-03 10:57
Igor Vigdorchik11-Mar-03 10:57 
GeneralLack of persistence Pin
Anonymous25-Feb-03 3:15
Anonymous25-Feb-03 3:15 
GeneralRe: Lack of persistence Pin
Igor Vigdorchik25-Feb-03 10:53
Igor Vigdorchik25-Feb-03 10:53 
QuestionUnable to link ??? Pin
TheDimitri6-Oct-02 20:00
sussTheDimitri6-Oct-02 20:00 
I compile this program under NT 4 and here are the errors messages :
Could you help me ???

Thanks...

Compiling...
stdafx.cpp
Compiling...
HiddenWnd.cpp
Note.cpp
NoteDlg.cpp
SearchDlg.cpp
SearchListbox.cpp
StickyNotes.cpp
Generating Code...
Linking...
HiddenWnd.obj : error LNK2001: unresolved external symbol __imp__Shell_NotifyIconA@8
Note.obj : error LNK2001: unresolved external symbol __imp__GetStockObject@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetStockObject@4
Note.obj : error LNK2001: unresolved external symbol __imp__DeleteObject@4
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__DeleteObject@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__DeleteObject@4
SearchListbox.obj : error LNK2001: unresolved external symbol __imp__DeleteObject@4
Note.obj : error LNK2001: unresolved external symbol __imp__GetObjectA@12
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__GetObjectA@12
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetObjectA@12
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__SetBkColor@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SetBkColor@8
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__SelectObject@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SelectObject@8
SearchListbox.obj : error LNK2001: unresolved external symbol __imp__SelectObject@8
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__CreatePen@12
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__CreatePen@12
SearchListbox.obj : error LNK2001: unresolved external symbol __imp__CreatePen@12
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__DeleteDC@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__DeleteDC@4
SearchListbox.obj : error LNK2001: unresolved external symbol __imp__DeleteDC@4
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__BitBlt@36
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__BitBlt@36
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__CreateDIBSection@24
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__CreateCompatibleDC@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__CreateCompatibleDC@4
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__GetDeviceCaps@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetDeviceCaps@8
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__MoveToEx@16
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__MoveToEx@16
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__LineTo@12
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__LineTo@12
NoteDlg.obj : error LNK2001: unresolved external symbol _ChooseFontA@4
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__CreateSolidBrush@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__CreateSolidBrush@4
NoteDlg.obj : error LNK2001: unresolved external symbol __imp__CreateFontIndirectA@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__CreateFontIndirectA@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SetViewportOrgEx@16
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetViewportOrgEx@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__ShellExecuteA@24
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetObjectType@4
SearchListbox.obj : error LNK2001: unresolved external symbol __imp__GetObjectType@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SetBkMode@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SetTextColor@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__Rectangle@20
SearchListbox.obj : error LNK2001: unresolved external symbol __imp__Rectangle@20
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__TextOutA@20
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SetTextAlign@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__CreateCompatibleBitmap@12
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__DPtoLP@12
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__LPtoDP@12
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__SetWindowOrgEx@16
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__ExtTextOutA@32
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetBkColor@4
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetClipBox@8
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__RoundRect@28
SearchDlg.obj : error LNK2001: unresolved external symbol __imp__GetTextExtentPoint32A@16
Debug/StickyNotes.exe : fatal error LNK1120: 35 unresolved externals
Error executing link.exe.

StickyNotes.exe - 58 error(s), 0 warning(s)
AnswerRe: Unable to link ??? Pin
Igor Vigdorchik7-Oct-02 10:49
Igor Vigdorchik7-Oct-02 10:49 
GeneralRe: Unable to link ??? Pin
Anonymous7-Oct-02 19:34
Anonymous7-Oct-02 19:34 
GeneralRe: Unable to link ??? Pin
Igor Vigdorchik8-Oct-02 11:01
Igor Vigdorchik8-Oct-02 11:01 
GeneralRe: Unable to link ??? Pin
Dimitri8-Oct-02 19:17
Dimitri8-Oct-02 19:17 
GeneralRe: Unable to link ??? Pin
Igor Vigdorchik10-Oct-02 11:29
Igor Vigdorchik10-Oct-02 11:29 
AnswerRe: Unable to link ??? Pin
Karl Edwall13-Nov-03 12:49
Karl Edwall13-Nov-03 12:49 
QuestionCan I compile on Windows 98? Pin
Weidong Shen24-Sep-02 10:41
Weidong Shen24-Sep-02 10:41 
AnswerRe: Can I compile on Windows 98? Pin
Igor Vigdorchik24-Sep-02 11:19
Igor Vigdorchik24-Sep-02 11:19 
GeneralRe: Can I compile on Windows 98? Pin
Weidong Shen25-Sep-02 3:33
Weidong Shen25-Sep-02 3:33 
GeneralRe: Can I compile on Windows 98? Pin
Igor Vigdorchik25-Sep-02 11:25
Igor Vigdorchik25-Sep-02 11:25 
GeneralRe: Can I compile on Windows 98? Pin
Weidong Shen26-Sep-02 5:15
Weidong Shen26-Sep-02 5:15 
GeneralRe: Can I compile on Windows 98? Pin
Igor Vigdorchik30-Sep-02 6:53
Igor Vigdorchik30-Sep-02 6:53 
GeneralRe: Can I compile on Windows 98? Pin
Weidong Shen1-Oct-02 3:24
Weidong Shen1-Oct-02 3:24 
GeneralRe: Can I compile on Windows 98? Pin
Igor Vigdorchik2-Oct-02 10:17
Igor Vigdorchik2-Oct-02 10:17 
GeneralRe: Can I compile on Windows 98? Pin
Weidong Shen3-Oct-02 10:16
Weidong Shen3-Oct-02 10:16 
GeneralRe: Can I compile on Windows 98? Pin
Igor Vigdorchik4-Oct-02 6:13
Igor Vigdorchik4-Oct-02 6:13 
GeneralRe: Can I compile on Windows 98? Pin
Igor Vigdorchik4-Oct-02 6:14
Igor Vigdorchik4-Oct-02 6:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.