Click here to Skip to main content
4.77 / 5, 1,764 votes
42 votes, 2.4%
1
7 votes, 0.4%
2
25 votes, 1.4%
3
131 votes, 7.4%
4
1555 votes, 88.4%
5

ToDoList 6.1 Beta Release - A simple but effective way to keep on top of your tasks

By .dan.g. | 28 Aug 2010
A hierarchical task manager with native XML support for custom reporting.

Downloads 

todolist.png

Latest Update (6.1 Beta Release)

Once again this release is not full of big features but instead a range of smaller features that should make using ToDoList easier.

Features include: 

  • upgrade comments to use RichEdit50
  • support relative paths in preferences
  • set comments selection to top by default
  • make due task notifications modal
  • fixed comments state saving/reloading
  • fix line endings in simple text comments
  • ALT+ column click moves focus to edit field
  • Allow 'Finds' to be used as filters
  • add zero minutes to reminder dialog
  • add toggle to turn filter on and off
  • add text field to filter bar to match against titles
  • add task name to 'copy as path'
  • add preference to place icons next to task title 
  • add option to append time to the time tracking log file
  • add Apply button to preferences dialog 
  • add absolute reminders 
  • add <none> to priority edit menu 

Related Links

After finally compiling a FAQ of the most relevant questions asked about ToDoList I've moved all resources related to ToDoList to a new page on my website.

Introduction

You know how it is - you start work on one project and halfway through, you find one or two side-projects crop up that have to be solved before you can continue on the original project.

This is one such project with the added twist that it too started its life as a side-project. Here's what happened:

<Cue wavy screen effect>

I can only imagine that the planets must have been in (mis-)alignment or something, because at one point a few months ago, I was suddenly fielding emails on four or five separate articles I had previously submitted to CodeProject, some asking for features and others for bug fixes.

Foolishly or otherwise, I largely agreed with all the points raised, and subsequently found myself with fourteen or fifteen separate issues to resolve.

The situation was also made worse because I was trying to use CodeProject to keep track of all the things I had agreed to do, meaning that I had to continuously trawl the comments section of each article to remind myself of what I was supposed to be working on.

It even got to the stage where I was worrying that I'd fail to deliver on something - silly I know, but there you are!

Keeping a list on paper was a definite step in the right direction, but since I do all my coding on the same machine, it seemed somewhat inelegant, and anyway, we all know what happens to crucial bits of paper left lying around on desks and such.

The next step was to hunt around on the web for a tool to meet the following requirements:

  • Simple interface
  • Support for hierarchical data
  • Numbered items/subitems
  • Open file format
  • Freeware

Simple, huh! not!

I will admit that I did not spend weeks searching, but I am still surprised at the general lack of software matching my needs.

On reflection, I think that the reason may be simple: people are so used to commercial software being 'feature-rich' that when they come to design software themselves, they (not unreasonably) think they too need to cram as much in as possible, often leading to software where a lot of essential functionality is hidden away in the menu bar.

So, surprise, surprise, I decided to write something myself.

However, it's fair to say that I did not originally intend to post it on CodeProject and am only really doing so because I had a heap of fun solving some very interesting problems and these are what I think make it worth it.

Using the Software

There's really very little I need to say here since every feature/function is explicitly visible in the interface.

Nevertheless, the following list of basic capabilities and omissions may go someway to answering any questions that arise:

  • Files are stored in XML format with .xml file extension.
  • Trying to load a non-tasklist file will generally fail (unless you read the code to see how to circumvent it).
  • The number of items/subitems is limited only by memory (although performance may be the deciding factor before you exhaust memory).
  • Marking a parent item as 'done' will also gray-out child items, but they are not disabled or automatically marked as 'done'.
  • An ellipsis (...) indicates that an item has sub-items.
  • All items can be expanded or collapsed (by double-clicking).
  • Top-level items and sub-items are created using different toolbar buttons.
  • There are task-specific context-menus.
  • The previously open tasklists are re-opened on startup.
  • The tasklist is automatically saved when closing the software or minimizing it to the system tray.
  • The priority of a task is shown as a grayscale box to the left of the item.

Points of Interest

Here's where we come to the side-projects I was talking about, the first two of which I intend to work up into follow-up articles.

They are:

  1. The 'ordered' tree control, which incorporates a non-client gutter for displaying the item numbers.

    The idea stemmed from research I did into alternative designs for a tree-list control, which did not solve it by creating a hybrid control incorporating a tree and a list.

    The hybrid control seems such an obvious solution that I suspect few people have stopped to question it, but it has still always struck me as looking far too much like hard work to be truly elegant ('square pegs' and 'round holes' spring to mind).

    One possible idea is to implement the 'list' portion entirely in the non-client area of the tree. I.e., shift the right hand client edge to the left and then render the list portion in the resulting non-client area.

    Whilst I've yet to get round to building a proof of concept, it was nevertheless this ongoing mental debate which prompted me to try to solve the requirement for numbered items and subitems by rendering the item/subitem numbers in the non-client area.

    Without going into too much detail (as this will subsequently be an article of its own), this is how I got it to work:

    • Handle TVM_INSERTITEM and TVM_DELETEITEM to know exactly when items are added and removed.
    • In these handlers recalculate the width of the gutter required to display the widest 'dotted' item/subitem number. (Note: this is not necessarily simply the deepest subitem.)
    • If the required gutter width changes, call SetWindowPos(NULL, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER) to force Windows to recalculate the non-client area of the control.
    • Handle WM_NCCALCSIZE when it does, and offset the left border by the required gutter width.
    • Handle WM_NCPAINT for painting the numbers.

    This is necessarily an over-simplification, but it captures the essence of the solution, and all that essentially remains is lots of fiddling about to ensure the non-client area gets redrawn at the the right times to stay synchronized with the client area.

  2. Embedding .RC control definition data directly in a .cpp file to break the dependency on binary resources (a.k.a. 'Runtime Dialogs').

    This is an idea that has been floating about for quite some time and which has only recently gelled into a workable solution.

    The problem, put simply, is that if you want to take advantage of the resource editor in Visual Studio (and who doesn't), then you very quickly find yourself stuck with having to load dialog templates from resources compiled into the binary file.

    This further means that if you want to make use of a dialog across multiple projects, then either you need to copy and paste the dialog template between project .RC files, or you need to build the dialog into a DLL from which it can be accessed.

    'Runtime Dialogs' (a snappy title I coined myself) is a solution that neatly sidesteps both the nuisance of copying dialog resources between resource files and the extra work (and maintenance) involved in packaging dialogs in DLLs.

    And it works like this:

    • First, you design your dialog template in the resource editor, create a CDialog derived class using class wizard, and wire up all the controls just as you normally would.
    • Next, you #include "runtimedlg.h" and change all instances of CDialog to CRuntimeDlg.
    • Then, you cut and paste the control definition section from the appropriate section in the .RC file and embed it directly in the dialog's .cpp file as a static string (with a bit of tweaking to handle double quotes and such like).
    • Finally, in the constructor of your dialog, you simply call CRuntimeDlg::AddRCControls(...) passing the control definitions as a string.
    • And CRuntimeDlg takes care of the rest including, if required, auto-sizing the dialog to suit the control layout.

    I'm certainly not suggesting that this is a 'win-win' solution for all situations but it certainly has merits in its closer coupling of dialog template to dialog code which makes sharing dialogs across multiple projects a breeze.

    P.S.: In case it's not clear here, I used CRuntimeDlg to create CToDoCtrl which encapsulates the ordered tree together with the priority, date and comments controls as a single simple-to-instantiate control.

    I'm also proposing to use them in the .NET port of my ProjectZip add-in for VC6.

  3. Embedding the XML file in a web page.

    This is possibly the most satisfying aspect of the whole project because it was completely unexpected.

    What I mean is that, until recently, my knowledge of DOM and XMLDOM was virtually non-existent, as it's only since I've become more interested in the presentation of AbstractSpoon that I've been forced to get to grips with the various implementations of DOM and XMLDOM out there.

    I'm pleased to say that the code on my site works under IE 6.0, Netscape 7.1, and Mozilla, although custom code was required to achieve this.

Generic MFC Classes that may prove Useful to You

The following table lists a wide range of utility classes written for this project. They can all be included in any MFC project provided you include any class dependencies too. Feel free to ask any questions relating to these specific classes and how to use them.

Class Name

Description

Class Dependencies
(apart from MFC)

CAboutDlg

Customizable "About…' dialog not requiring a dialog resource. Supports html encoded text

CRuntimeDlg, CRCCtrlParser

CAutoComboBox

Adds only unique items to the drop list and shuffles the list so that the last added item is at the top

CHoldRedraw

CAutoFlag

Encapsulates the setting and unsetting of a boolean variable thru the lifetime of the class instance

CColorButton

Non-ownerdraw button that displays the selected colour on the button face and displays the colour dialog when clicked

CEnColorDialog

CColorComboBox

Owner-draw combobox for displaying and selecting user defined colours

CDateHelper

Encapsulation of various rountines for calculating date spans and for formatting

CDeferWndMove

Encapsulation of the Win32 API

CDialogHelper

Re-implementation of the CDialog DDX/DDV rountines to avoid the MFC error messages when the user clears a number edit (for instance)

CDlgUnits

Encapsulates the MapDialogRect Win32 API

CDockManager

Class for managing the docking of one popup window to another.

*CSubclassWnd, CHoldRedraw, CAutoFlag

CDriveInfo

Encapsulates various rountines for querying about drives, files and disk space

CEnBitmap

Adds support to CBitmap for loading non-bmp files and resources.

CEnBitmapEx, CColorReplacer, CImageBlurrer, CImageColorizer, CImageContraster, CImageEmbosser, CImageFlipper, CImageGrayer, CImageLightener, CImageNegator, CImageResizer, CImageRotator, CImageSharpener, CImageShearer, CImageSysColorMapper, CImageTinter

Adds image manipulation funationality to CEnBitmap

CEnBitmap

CEnColorDialog

Adds saving and restoring of custom colours to CColorDialog

CEnCommandLineInfo

Adds functions for extracting and querying commandline switches

CEnEdit

Adds user-defined button capabilities to CEdit

CMaskEdit, CThemed, CDlgUnits

CEnToolBar

Adds support for using alternative resource or file images

CFileEdit

Adds buttons for browsing and displaying the file represented by the text in the edit control. Also shows the file's small icon.

CEnEdit, CFolderDialog, CMaskEdit, CDlgUnits, CThemed, CSysImageList

CHoldRedraw

Encapsulates WM_SETREDRAW

CHotKeyCtrlEx

Fixes a number of behavioural problems including the handling of certain keypresses

CHotTracker

Tracks the cursor movement over user-defined windows and posts event messages as necessary

*CSubclassWnd,

CLimitSingleInstance

Provides simple method to detect if another instance of an app is running

CMaskEdit

Adds simple character masking to CEdit

CNcGutter

Allows the UI of standard windows controls to be extended by supporting any number of columns to be added to the non-client area of the window. Favours tabular controls like lists, trees, etc

*CSubclassWnd, CHoldRedraw, CThemed, CDlgUnits

COrderedTreeCtrl

CTreeCtrl implementation of CNcGutter displaying a single column showing the hierarchical position of each tree item in '1.2.3.4' notation.

CHoldRedraw, CThemed

CPasswordDialog

Very simple password dialog not requiring a dialog resource

CRuntimeDlg, CRCCtrlParser

CPropertyPageHost

Simpler replacement for CPropertySheet allowing easier creation as a child window

CRCCtrlParser

Used by CRuntimeDlg for parsing dialog resource-like text

CRuntimeDlg

Adds support to CDialog for building dialogs at runtime ie. dialogs do not require a dialog resource

CRCCtrlParser

CShortcutManager

Class for handling application keyboard shortcuts.

*CSubclassWnd, CWinClasses

CSpellCheckDlg

Spellcheck dialog not requiring a dialog resource, which interfaces with ISpellCheck (interface to Open Office dictionaries)

CRuntimeDlg, CRCCtrlParser, ISpellCheck

CSysImageList

Encapsulates the Windows system image list (file/folder images)

CTabCtrlEx

Adds post rendering callback for the tabs without using owner-draw

CThemed

Encapsulates themed (XP) and non-themed (the rest) drawing of windows controls

CTimeEdit

Adds a button for specifying time units and provided routines for converting time to and from different time units

CEnEdit, CMaskEdit, CThemed, CDlgUnits

CToolbarHelper

Adds support for dialog toolbar tooltips, multiline tooltips and dropbuttons with menus

*CSubclassWnd, CEnBitmap, CEnBitmapEx

CTrayIcon

Encapsulates the Shell_NotifyIcon Win32 API. Also provides balloon tips and animation

*CSubclassWnd,

CUrlRichEditCtrl

Adds support for recognizing urls, clicking them and setting custom url callbacks

CWinClasses

Encapsulates the ::GetClassName Win32 functions

CXmlFile, CXmlItem

Non-Unicode class for reading and writing xml files

CXmlFileEx

Adds encryption capabilities to CXmlFile

CXmlFile, IEncryption

* CSubclassWnd was originally written by Paul DiLascia for MSJ magazine. The version I use has been heavily extended to suit my specific needs. The classes that depend on it here need this extended version.

Further Work

Whilst this tool was originally intended for my personal use only, it is now a 'community' project, so if you find it useful and want to make suggestions for enhancements or bug fixes, then post below.

History      

  • 6.1 Beta Release (b1) (13 Feb 2010)  
    • upgrade comments to use RichEdit50
    • support relative paths in preferences
    • set comments selection to top by default
    • make due task notifications modal
    • fixed comments state saving/reloading
    • fix line endings in simple text comments
    • ALT+ column click moves focus to edit field(s)
    • Allow 'Finds' to be used as filters
    • add zero minutes to reminder dialog
    • add toggle to turn filter on and off
    • add text field to filter bar to match against titles
    • add task name to 'copy as path'
    • add preference to place icons next to task title 
    • add option to append time to the time tracking log file
    • add Apply button to preferences dialog 
    • add absolute reminders 
    • add <none> to priority edit menu
  • 6.0.8 (22 Dec 2009)  
    • Fixed window fading bug
    • Adjusted 'selected-not-focused' task background colour
  • 6.0.7 (18 Dec 2009)  
    • Fixed MRU saving bug
  • 6.0.6 (17 Dec 2009)  
    • Fixed Listview Find dialog 'Select All' bug
    • Fixed due task notification title bug
  • 6.0.5 (16 Dec 2009)  
    • Fixed task dependency bug 
  • 6.0.4 (14 Dec 2009)  
    • Fixed QuickFind searching
    • Fixed TAB and SHIFT+TAB behaviour
  • 6.0.3 (08 Dec 2009)  
    • Fixed more focus related bugs
    • Fixed reminder snoozing 
  • 6.0.2 (05 Dec 2009)  
    • Fixed bug in reloading task reminders (Important)
    • Fixed bug indenting csv files with tabs
    • Fixed behaviour of TAB and SHIFT+TAB in rich edit comments
    • Refixed bug with time tracking updating time spent field
  • 6.0.1 (02 Dec 2009) 
    • Removed auto-indent in rich text number lists 
  • 6.0 Feature Release (02 Dec 2009)
    • Added '$(selTAllocTo)' and '$(sellTAllocBy)' to Tools preferences setup
    • Added 'Time spent' to the default attributes list in the preferences
    • Added completed time to completed date
    • Added Ctrl+- (hyphen) as a shortcut to the rich edit comments for strikethrough
    • Added parent connection to child tasks in iCalendar format
    • Added task icon column
    • Allowed renaming of task icons
    • Allowed task icons to be replaced
    • Allowed archive of selected tasks
    • Auto-export to any format not just html
    • Be able to maximize comments (like Ctrl+M, but for comments)
    • Changed CTRL+Tab to plain Tab in rich text and simple text comments
    • Fixed bug in time estimate calculation where units are not being set correctly
    • Added preference to have subtask inheritance work throughout a task's lifespan
    • Play a sound when a reminder is triggered
    • Save state of richedit toolbar/ruler
    • Add preference to treat tasks without due dates as 'due today'
    • Turn off default tree expansion after loading
    • Fixed bug in rich text tab settings 
    • Allow icon files to supplement built-in task icons (place icons in Resources folder)
    • All taskfile date strings are now stored in ISO format
    • Double the number of rich edit tabstops at half the spacing
    • Applied text export indentation preferences to csv export  
  • 5.9.2 (24 Sep 2009)
    • Fixed time tracking not ending when tasklists are being closed
    • Fixed time spent attribute field not updating during time tracking
    • Fixed list view date alignment not the same as tree view
    • Fixed crash downloading multiple web tasklists
  • 5.9.1 (22 Sep 2009)
    • Updated resource version number (for people using translated resources)
  • 5.9 Feature Release (20 Sep 2009)
    • Added multi-column sorting 
    • Added option to recreate recurring task rather than reusing it
    • Added preference to colour flagged tasks
    • Added 'Version' to inheritable attributes
    • Added 'Set Reminder' button to toolbar
    • Preferences requiring admin privileges now show the shield icon in Vista
    • Theme defaults to 'blue' for first time users
    • Right-aligned dates if the option to display 'Day of Week' is set
    • Made it possible to enter times as 9.45 or 9,45 for quarter to 10
    • Fixed reminders to work with recurring tasks
    • Improved performance of tasklist navigation. Now 2-3 times faster than 5.8
    • Improved performance of date calendar navigation
    • When tree/list does not have the focus the selection colour is faded out
    • 'Status', 'Version' and 'Alloc by' filter droplists now support multi-selection 
    • Fixed bug where last open tasklist on USB drive was not being reloaded on starting ToDoList
    • Fixed text and backgound colour comments toolbar buttons not updating as the selection changed 
    • Fixed iCalendar exporter to work with Outlook and Google Calendar
    • Fixed various bugs in GanttProject exporter 
  • 5.8.8 (10 July 2009)   
    • Fixed task reminder snooze times
    • Fine-tuned auto-sorting 
  • 5.8.7 (04 July 2009)   
    • Fixed version number
    • Fixed crash when undoing the last created task in listview (again)
    • Fixed time tracking turning off whenever the tasklist was saved
  • 5.8.6 (02 July 2009)  
    • Fixed RTF numbered lists so that they start with 1.
    • Fixed FTP bug where .tdl files were not being displayed
    • Fixed crash when undoing the last created task in listview
    • Fixed crash when selecting a Find result for a tasklist that had been closed
    • Fixed listview not updating when a task is split
    • Fixed Start Date column not resizing when the time is modified
    • Fixed problem manually typing Due Time when filtering on due tasks and auto-refiltering
  • 5.8.5 (29 June 2009) 
    • Fixed bug where auto-refiltering was incorrectly setting due dates on unselected tasks
  • 5.8.4 (27 June 2009)  
    • Reminders are ignored for completed tasks
  • 5.8.3 (24 June 2009) 
    • Various theming tweaks
    • Fixed bug with negative costs
    • Fixed bug when cycling backup files 
    • Fixed bug exporting tasks with no priority to csv
  • 5.8.2 (22 June 2009) 
    • Various theming fixes  
  • 5.8.1 (21 June 2009)
    • Fixed tab theming bug
    • Renamed theme files
  • 5.8 Feature Release (20 June 2009)
    • Task reminders
    • FTP support for remote tasklists (via File menu)
    • Task icons (Edit > Other Task Attributes > Set Task Icon) 
    • Time component added to Start dates
    • Restored preference to control refiltering when editing (mainly to fix a specific bug)
    • Numbered bullets added to Rich Edit comments 
    • Simple theming (4 sample themes included in the Resources folder)
    • Separate preference for hiding Start time
    • Added preference to control maximum width of columns  
  • 1.1-5.7 (removed by .dan.g.)
  • 1.0 (4 Nov 2003)
    • Initial release.

License

This article, along with any associated source code and files, is licensed under The Eclipse Public License 1.0

About the Author

.dan.g.


Software Developer (Senior)

Australia Australia

Member
.dan.g. is a former chartered structural engineer from the uk. He's been programming since university and has been developing commercial windows software in Australia since 1998.

For all his latest freeware visit http://www.abstractspoon.com/

Sign Up to vote for this article
Add a reason or comment to your vote:

Comments and Discussions

Hint: For improved responsiveness use Internet Explorer 4, Firefox or above. Ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 15,695 (Total in Forum: 15,695) (Refresh)FirstPrevNext
GeneralFeature Request: Category HierarchymemberJustin_A_M10hrs 47mins ago 
GeneralThank you!membere.johnik7:36 3 Sep '10  
GeneralTask is done - recalculate the sum of costsmemberPierre de la Verre21:04 2 Sep '10  
GeneralHotkey / Focus - IssuememberSteve_12346:45 31 Aug '10  
GeneralRe: Hotkey / Focus - Issuemembermarkus folius20:59 31 Aug '10  
GeneralRe: Hotkey / Focus - IssuememberAlexxcode6:25 1 Sep '10  
GeneralRe: Hotkey / Focus - Issuemembermarkus folius14:23 1 Sep '10  
GeneralRe: Hotkey / Focus - Issuemember.dan.g.23:05 1 Sep '10  
GeneralRe: Hotkey / Focus - IssuememberAlexxcode3:12 2 Sep '10  
GeneralGreat Stuff!memberAnt21005:23 31 Aug '10  
QuestionCopy formatmemberSteve_12345:09 31 Aug '10  
AnswerRe: Copy formatmember.dan.g.23:06 1 Sep '10  
GeneralRequest - add copies of 3 existing fieldsmemberWeby20069:02 30 Aug '10  
GeneralFind task filter issue ?membermarilynedell4:22 29 Aug '10  
GeneralRe: Find task filter issue ?member.dan.g.23:12 1 Sep '10  
QuestionNew task doesn't stay in selected positionmemberNotetaker21:55 28 Aug '10  
AnswerRe: New task doesn't stay in selected positionmember.dan.g.23:11 1 Sep '10  
NewsI'm Back! [modified]member.dan.g.13:10 26 Aug '10  
GeneralRe: I'm Back!memberrobbson13:27 26 Aug '10  
GeneralRe: I'm Back!membermarkus folius14:56 26 Aug '10  
GeneralRe: I'm Back!member.dan.g.18:52 26 Aug '10  
GeneralRe: I'm Back!membermarkus folius20:10 26 Aug '10  
GeneralRe: I'm Back!memberverithin20:55 26 Aug '10  
GeneralRe: I'm Back!memberHoppfrosch20:59 26 Aug '10  
GeneralRe: I'm Back!memberBuckDanny21:08 26 Aug '10  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 28 Aug 2010

Copyright 2003 by .dan.g.
Everything else Copyright © CodeProject, 1999-2010
Web19 | Advertise on the Code Project