Ok! Here is a little bit information you need to understand. Middle clicking
on a Taskbar Button is used to Minimize or Restore a running application.
This is the default behavior of Windows and don't need any additional
settings. This is the fastest way to minimize and restor a running
application.
You want to close the application by middle clicking the taskbar button
which maybe not be possible. Atleast not just by single clicking the taskbar
button. You can right-click on the taskbar button and click Close or you can
use ALT+F4 key to close the active Window.
There are 100s of utilities available for managing Taskbar button. Maybe one
of them has an option to close a taskbar button but I am sure that it will
also not with a single click. Because doing this can cause a lot of trouble.
We usually use taskbar buttons for Minimizing or Restore and even for
switching between multiple applications. Suppose, if any tweaks change this
behavior then switching will be more tough. We have to use ALT+TAB key each
time to move between Taskbar button which will be more annoying.
Here are some google results for managing Taskbar button:
http://www.google.co.in/search?hl=en&q=managing+taskbar+button&meta=
Hope any of this helps you, let us know!