When I first released ToDoList more than 11 years ago it was as a consequence of exploring some UI ideas, the principal of which was using the non-client region of a tree-view control to draw attribute columns.

But while this satisfied my research goal it had a major drawback: The attribute columns could not move independently of the task titles meaning that if you displayed too many columns the task title got squeezed and some of the attribute columns might not be visible.

In addition there was no column reordering or resizing because I would have had to write this from scratch and that seemed too great an effort when the built-in Windows list-view gave you that for free. So I pushed the problem into the background and palmed-away questions as they came up.

Then sometime in 2012 I started to think about creating a Gantt plugin and I realised that the 'tree-part' and the 'bar-part' were going to have to be physically separate because the 'bar-part' was definitely going to need to scroll horizontally but that scrolling could not cause the 'tree-part' to be hidden. And I further realised that solving this might also provide the solution to Task-Tree attribute columns issue.

So I started work on a 'Tree-List-Syncer' whose primary goal was to synchronise the vertical scrolling of either a tree and a list or two lists, positioned side-by-side. Additionally the LHS widget had to hide its vertical scrollbar and instead respond to scroll events from the RHS widget.

The Gantt plugin was released with 6.7 in 2013 and proved successful as a solution yet it still took a couple more versions for me to summon up the courage to pull open the guts of the app to replace the Task-Tree and List-View. I think I was still hoping that the Gantt plugin would reveal a huge flaw in my approach so that I didn't have to do the work!

But here it is. Both the Task-Tree and List-View now have task attributes that can be scrolled horizontally without impacting the task titles. They are divided by a splitter bar (which can be effectively hidden in the preferences) giving total control over 'pane' widths. Attributes columns can be reordered and resized by dragging the column header dividers ala Explorer.

I do understand that some of you will find these changes upsetting but they had to made in order that other more important usability features could be included to keep ToDoList relevant.

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:

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.)

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.

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.

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.

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

7.0.13 (04 Feb 2016) - Mostly likely the last update of 7.0

Fixed uneven task row heights on Windows XP 64-bit

Fixed incorrect strike-through in Find Tasks dialog for incomplete parent tasks having all their subtasks completed

Fixed doubled-up Help Menu separator on XP

Fixed translation 'Cleanup' button not saving changes

Fixed XML encoding for Unicode tasklists

Fixed tasklist tab-bar resize bug after double-clicking on titlebar

7.0.12.1 (20 Jan 2016)

Fixed loading of Ansi tasklists

7.0.12 (14 Jan 2016)

Fixed bug where pasting a text fragment from Firefox would display the wrong source URL

Fixed List View selection render artifacts in full screen when resizing the title pane

Fixed inability to tab to Status field after making the field 'read-only'

You may notice from the wiki pages (which need updates...) that I've tried to document core functionality while also creating pages that describe how ToDoList can be used in various contexts. So it's not just about which buttons to press, but about why you might want to use the various features. I believe this is your intent with the ToDoList for Dummies concept. The Wiki is that documentation.

Please note the link in my signature here for the Wiki Suggestion Box[^]. You are welcome to write up minimal notes there which I will incorporate into the wiki. Or we can exchange notes via email. (PM me off list for contact info if you don't have it, or send your address to the Suggestion Box, I don't publish email addresses in public.) Or you can use GitHub, create an Issue, and start posting content there for review and possible inclusion (although that's not ideal). I'd like to invite you to open a single thread in the Google Group too where you can solicit feedback on your contributions and sort of build your documentation as you go in collaboration with others, but Dan may not agree to such usage of that medium. ( ? )

So, no need to wait to write a book ( I write a book in every forum post ). You can start now, and actually your soul searching now will be quite valuable to others who are in the same position. After we get to know something it's often tough to remember what it's like not to know it, and perhaps the frustration of trying to get info on specific topics. Post questions if you don't see something in the wiki. HowTo questions allow others to respond with how They do something, which can help everyone. And this entire process can help Dan to see where there may be some weaknesses for an occasional helpful tweak ... that happens a Lot.

A couple of your requests may already be implemented in a way:
First, ctrl-D to insert the date/time.
Second, note a couple options under Prefereces>User Interface>Tasklist Attributes Date/Time formatting: Append the users 'Created By' name when pasting the Date/Time, and Append the following text when pasting the Date/Time. I put a space in that field. Someone else might want a comma or colon or hyphen...

From that same preference page, under Other, see : Display comments after task title, and Display only the first line of comments. So you can have a short task title and the first line will automatically display in the grid.

I tend to go more for clicking around on a menu than using key commands . I guess I was wishing for the context menu in the comment field to look more like the Edit menu--I really like the way the commands are organized on the Edit menu, with all insert, copy, and paste commands listed together in groups, and mostly in flat lists not involving submenus.

iamstarbuck wrote:

Display comments after task title, and Display only the first line of comments

I tried "Display only the first line of comments", but when the first line of comments is displayed in a task title, it does not replace the default title name, "Task", and it is also grayish.

For "Selected text as task title", maybe "Display the first line of typed comments as task title" (i.e., bypassing the automatically stamped date and time--if that becomes an option) would be an even better implementation--it would require fewer mouse clicks from the user .

And somewhat related to task titles, here's a thought on comment titles: to have the first line of typed text in the comment field automatically boldfaced so it'd stand out as a title for comments would also be really helpful, especially when the comment field is maximized, with the task tree out of view.

This is Dan's software and he might or might not implement your suggestions. Anything I say here is just a personal comment based on my own usage.

For making the first line of the comment the actual task title, this can be accomplished with a UDT, and with less effort than selecting, going to a context menu, and selecting an option. With just a tiny bit of code, a UDT can read the comment, extract the first line, then execute a TDL command-line that sets the title with that text. So if you have any programming experience consider that. If not then I might add this to my Nebula UDT (see my sig).

About bolding the text, that implies that all of your comments are Rich and not Plain Text. That may be the case but there's no certainty. I'm thinking there are not only conditions for which you need to be aware, but this is a highly specific request which almost certainly doesn't apply to most other users. This is yet another application for a UDT. For reference it's also possible to do this with my .NET library, which has still not yet been published. If there is some way you can make your request less specific to one user, it might get more support.

Because these proposals are very specific to the way that you work, I suggest using a scripting tool like AHK to create the custom actions and then adding them to TDL as user-defined tools in the preferences. This way they would all appear in the Tools menu as well as on the toolbar.

Would you at some point reconsider modifying the organization of the comment field's context menu somewhat, so that the copy, paste, and insert commands are grouped together--as they are on the Edit menu--instead of being listed in separate sections?

As for "Display the first line of comments as task title": is there a way to make an UDT with AHK for a command that's not listed in Preference>Shortcuts? (This must be beyond my "programming experience"! )

is there a way to make an UDT with AHK for a command that's not listed in Preference>Shortcuts? (This must be beyond my "programming experience"! )

Sure - a User Defined Tool executes a "DOS" command-line. So anything you can do from the command-line can come back into TDL to do things. So if you have an AHK script that can affect the TDL UI, pass information to it via the UDT, then have it use that info to do what you need.

Granted, it's not so easy to get AHK to do things. You need to get it to access the right application, then to find controls or text, then to do some function or execute the right hotkeys. You need to know that you're in the right place and entering the right data, just like a person but without the benefit of sight. Yes, it's a challenge.

Another way to do this would be to have your UDT Save your list (force a ctrl-s or menu option to the UI), then modify the .tdl XML with your tool of choice, and then force the UI to refresh the tasklist from disk.

You should be seeing the pattern here. A UDT is a hand-off to some other routine that does something for you. It's not a plugin which controls TDL directly. In fact, it's not related to TDL at all. The UDT causes execution of something outside of TDL - it's "coincidence" that we want it to come back and do something with TDL ... it can as well operate on any other application or data. Perhaps if you separate the concepts you'll be able to work out more ways to affect TDL from outside - using UDTs as a way to invoke those tools.

Thank you very much for your informative response; but I'm afraid it's all sorta over my head (and that's an understatement! ): my "programming experience" is limited to making UDTs with AHK for commands listed in TDL's Preferences>Shortcuts; I don't have a clue as to how to do that for, say, "Display the first line of comments as task title", since that is not currently an available command in TDL. Is there a way to add such a command to the list of shortcuts?

In the Print Preview dialog there is a drop down list of titles that were previously used to print task lists. How may I delete the entries in this drop down list? I tried various key combinations including Ctrl-Del, Shift-Del, Ctrl-Bksp and Shift-Bksp but none of them works.

Today I noticed that the preference "Allow multiple instaces of TDL" under "General" is greyed out and cannot be checked or unchecked. Not sure since when this happened, maybe after moving to Windows 10 or installing 7.1DR8. What can cause this problem?

7.0.13:- Start the exe- Check the pref. Multiple instance (MI) is off. I set it to on.- I start the exe again - a second instance is displayed

7.1.DR8:- Start the exe- Check the pref. Multiple instance (MI) is on.- I start the exe again - nothing happens.- I repeat it sometimes: switch the status - start the exe; close and restart with status on / status off. - Nothing happens.