Fog Creek Software
Discussion Board

Windows Template Library

Has anyone here built a significant application using the Windows Template Library (WTL), the windowing extension to ATL.  Good experience or bad?

Too Many Windows Books
Tuesday, October 29, 2002

Allow me to correct my punctuation:

Has anyone here built a significant application using the Windows Template Library (WTL), the windowing extension to ATL?  Good experience or bad?

Too Many Windows Books
Tuesday, October 29, 2002

I have just started working with WTL and so far like what I see, the big problem for me though is it is proprietary MS code and not given very much attention by them or anybody else. I did a serach on Amazon and there isn't one book on it or ATL7.

I'd love to see an open source equivilant for Windows development.

Tony E
Tuesday, October 29, 2002

WTL isn't 'officially' supported by MS, though it seems there is adequate 'unofficial' support by MS volunteers through the community (

Tuesday, October 29, 2002

The following ATL books have chapters dedicate to the WTL:
- "ATL Internals", by Brent Rector and Chris Sells, Chapter 9: Windowing
- "Professional ATL COM Programming", by Dr. Richard Grimes, Chapter 9: ATL Window Classes

Heston Holtmann
Tuesday, October 29, 2002

I don't know about the wrox book but ATL Internals focusses on the pre WTL windows classes in ATL, it gets you started but doesn't go very far.

I agree there is good unofficial support but when you are creating a commercial product you want some confidence in the continuity of the product. For example when ATL7 was released there was some debate that WTL might not keep up to date. I'd just like to see a bit more commitment from MS to it.

Tony E
Tuesday, October 29, 2002

I wouldn't touch the Windows Template Library. It is definitely "end-of-lifed". Historically, it lives in the limbo of Microsoft's ATL-->COM+-->.NET transition. I don't expect Microsoft to ever release a new version or tool support for WTL.

Zwarm Monkey
Tuesday, October 29, 2002

I built a couple of medium sized GUI apps with WTL.

My experience was generally positive, but I had been using ATL for at least four years by that point, and considered something of an expert in it. With that background, WTL was a breath of fresh air to me compared to the MFC prison.

The plus side of WTL:

* Designed like ATL rather than MFC. Functionality is composed via multiple inheritance in a shallow hierarchy rather than using a deep single-inheritance hierarchy where the functionality you want isn't in the branch you need it (What do you mean I need a view to have scrolling support?)

* All source code is available, and it's quite readable if you understand ATL. This also alleviates the "end of life" arguments - who cares if it doesn't get maintained? You've got the source code, and it's easy to tweak.

* Since WTL is built around composition, it's dirt simple to extend to do whatever you need to.

* Support from WTL's author is quite good - there's a WTL yahoo group that he hangs out on.

Down sides of WTL:

* If you don't know ATL, or are afraid of templates, stay away. It won't make any sense at all.

* Documentation is essentially non-existant. There's a good intro article (2 parts) on somewhere that explains the basics of what's in the library and how to use it. has a WTL section with some good stuff. But there's no books and no printed articles and no likelyhood of any appearing any time soon.

* Very slow compile times. Lots of templates mean lots of work for the compiler.

In general, WTL is the expert's tool. If you know Win32 programming well, and understand how ATL is put together, WTL will make you VERY productive, even without the handholding of wizards. If you aren't, well, you're in for a bit of a tough road. But the destination is well worth it.

On the other hand, if you just want to churn out a couple of dialogs, use WinForms instead.

Chris Tavares
Tuesday, October 29, 2002

I'd have to agree with Chris. If you know what you're doing with WTL (ATL and templates too) you can create some very slick and efficient software. But it could be a steep learning curve depending on where you're coming from and I'd argue that the work might be better spent elsewhere.

John C
Tuesday, October 29, 2002

The links to the two articles on are:

Found thanks to the Internet Archive Wayback Machine,

Jason Stafford
Monday, May 10, 2004

I am using it with good success to create a plug in based
COM application using ATL 3.0, WTL 7.0/7.1/7.5 under VC++ 6.

WTL is now open sourced and is now at version 7.5 - there's also been a version 7.1.

For details, see:

Mike Diack 23 June 2004.

Mike Diack
Wednesday, June 23, 2004

*  Recent Topics

*  Fog Creek Home