Vista: TaskDialog

Thu, June 1, 2006, 05:07 PM under Windows | Vista
One of the many new things in 'comctl32.dll version 6' is the TaskDialog.
A task dialog is similar to, while much more flexible than, a basic message box.

There are two variants of the TaskDialog the second of which is the one that gives you enormous flexibility and power. We will look at the first variant which, while being simpler, still offers advantages over the old MessageBox API :-)

When I say "look", what I mean is I will share my managed wrapper since TaskDialog is a native API only at this point.

First let's look at what the managed wrapper looks like in a Class Diagram (IWin32Window is part of the .NET Framework, of course):


Here is a VS2005 screenshot of intellisense when using our class:


My test harness looks like this:


And finally, here are a couple of screenshots of the end product:



You may download the sample project here (remember, this only works on Vista!).