Click here to Skip to main content
Click here to Skip to main content

Easy installation of WTL

, 4 Apr 2003
Rate this:
Please Sign up or sign in to vote.
This article shows an alternative, and simpler way of downloading and installing WTL.

Latest news!

Have a look at Michael Dunn's WTL for MFC Programmers, Part I - ATL GUI Classes in the Beginners section (and also at the Part II). It contains the reference to the newer WTL70.exe, which can be easily downloaded and self-extracted (WinZip). The article and also shows the first steps with ATL and WTL. The article is said to be targeted to MFC programmers, but it is perfect also for those with ATL experience only or for the "hard-core Petzold followers". The articles are simply excellent. I wish I could read something like that some years ago, when I started with ATL and WTL.

Please, do not focus on the text below. It is already very obsolete and should be ignored these days. It was last updated almost exactly two years ago (3rd April 2001). I did left the content below untouched only because some other articles refer to this one (and to record the history Wink | ;-) .

The article below is clearly obsolete due to the availability of a downloadable self extracting archive file wtl31.exe available from the MSDN Online Downloads page. My thanks go to Gavin Jerman who posted the notice here, and to Nenad Stefanovic who made the wtl31.exe available:

  Hi everybody,

  In addition to the Platform SDK, WTL 3.1 is now also available on the
  MSDN Downloads. Just go to <a href="http://msdn.microsoft.com/downloads">http://msdn.microsoft.com/downloads</a>,
  and find WTL under the "Visual Studio, Tools and Languages" \ "Visual C++"
  category.

  Enjoy,
  Nenad

As far as I know, the self extracting archive file was made available at 3/23/2001. The size is 317,880 bytes. While the following approach still works, this article is only a part of history from now on, and it is going to die silently. I will recommend to Ben Burnett to merge this article into his Introduction to WTL – Part 1 where it fits better.  The original article follows.

Introduction

Ben Burnett's article Introduction to WTL – Part 1 contains basic information on WTL. The section Where do you get it? shows the standard way to download the latest version of WTL from Platform SDK web site.

This article shows the alternative way of downloading and installing WTL which is less painful for those with low speed Internet connection. The result of few steps is the WTL subdirectory in your working directory. Then you can copy its content into the usual subdirectory for WTL files like C:\Program Files\Microsoft Visual Studio\VC98\WTL.

Motivation

The WTL (Windows Template Library) contains about 900 kB of header files. Getting them is necessary and sufficient condition to start working with WTL. In addition, you may want to use ATL/WTL wizard — the size of the binary form is about 250 kB. What can help you at the beginning are the examples. The October 2000 Platform SDK contains four examples in subdirectories BmpView, GuidGen, MdiDocVw, and MTPad. Size of sources is about 180 KB.

To summarize, all the needed files have about 1.3 Mb (to have a full installation of WTL). The cabinet files that must be downloaded have together less than 1 MB. This is quite acceptable even when having very slow Internet connection. The problem is that the standard Platform SDK installation procedure requires to download much more data. Being connected via 56k or less modem, it is very painful and time consuming. It could be almost impossible if the connection line is not reliable.

So, what is the alternative way?

The idea is based on manual downloading of one or two cabinet files using ftp protocol. This can be done also using a web browser (like Microsoft Internet Explorer) by just clicking on links below. You also download one small zip file linked at the top of this article. It contains single batch file. Then you run the batch file and you get the WTL subdirectory with all necessary files. You need to download only 900 KB of data or so.

The steps

Place all downloaded files into one working directory. Nothing special is going to happen there. Files will only be extracted into subdirectories of the working directory. Other directories will not be affected. The steps were tested on October 2000 Platform SDK release (WTL Version 3.1).

  1. Download the ftp://ftp.microsoft.com/developr/PlatformSDK/Oct2000/psdk-common.48.cab file. It contains the WTL header files and examples. The size of the cabinet file is about 890 KB. For Windows 9x, see also text just behind the numbered steps.
  2. Download the ftp://ftp.microsoft.com/developr/PlatformSDK/Oct2000/psdk-x86.48.cab file. It contains the ATL/WTL wizard. It is not necessary, but the size of the cabinet file is only about 40 KB. So why not. For Windows 9x, see also text just behind the numbered steps.
  3. Download the WTLinst.zip or WTLinst9x.zip archive file linked at the beginning of the article. (Extremely small, only 2 kB.)
  4. Unzip the downloaded archive file WTLinst.zip or WTLinst9x.zip using for example free unzip utility by Info-ZIP. The downloaded archive contains single batch file.
  5. Having the extracted batch file and one or two cabinet files in the same working directory, run the WTLextract.bat or WTLextr9x.bat respectively.
    • Warning! The WTLextract.bat will not work on Windows 9x and the WTLextr9x.bat will not work on Windows NT.
  6. Copy the content of the created WTL subdirectory to the desired place and ensure that the Include subdirectory with header files is searched by VC++ compiler.

Isn't it easy?

Notice for Windows 9x: If you have problems with storing the cabinet files on your disk because of their names (two dots in the name), store them as wtl1.cab and wtl2.cab. If you store them using the original names, the WTLinst9x.bat batch will rename them anyway to avoid problems with the extract utility on Windows 9x. The new names are treated as synonyms for the original cabinet files.

And how does it work inside?

Well, you can look inside the batch file Wink | ;-) . O.K., here is a snippet of the internal magic. In fact, it shows all important actions to extract all the WTL header files from the psdk-common.48.cab cabinet file:

extract /L WTL/Include psdk-common.48.cab *.A1000D79*

cd WTL\Include

rename AtlApp_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C    AtlApp.h
rename AtlCrack_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlCrack.h 
rename AtlCtrls_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlCtrls.h 
rename AtlCtrlw_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlCtrlw.h 
rename AtlCtrlx_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlCtrlx.h
rename AtlDdx_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C    AtlDdx.h
rename AtlDlgs_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C   AtlDlgs.h
rename AtlFrame_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlFrame.h
rename AtlGdi_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C    AtlGdi.h
rename AtlMisc_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C   AtlMisc.h
rename AtlPrint_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlPrint.h
rename AtlRes_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C    AtlRes.h
rename AtlScrl_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C   AtlScrl.h
rename AtlSplit_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C  AtlSplit.h
rename AtlUser_h.A1000D79_C485_4CB3_8AB0_B6D38ED2B38C   AtlUser.h

The extract utility is a part of Windows. The options ensure that the WTL/Include is the directory for extracted files. If the subdirectories do not exist they will be created. The file mask *.A1000D79* is related to the WTL header files. The full names of extracted files are visible in the rename commands part. They are renamed to the original WTL names.

The installation batch for Windows 9x is more obscure because the extract utility cannot find the cabinet files with two dots in the name, and also it cuts the extracted file names to the 8.3 form. The cabinet files must be renamed first and the extraction process must be split to more parts because some of the file names do overlap when shortened to 8.3 form. I tried hard to use the extrac32 utility instead of extract, but I was not successful here. It is probably because the extrac32 is treated as a Windows program and it is executed asynchronously. If you know how to solve the problem using extrac32, I'll be glad to accept and embed the solution here (there still is some place in the following acknowledgements Wink | ;-) .

Acknowledgements

I'd like to thank firstly to authors of WTL. My thanks goes also to Ben Burnett for showing total WTL beginners Where do you get it?, to Michael Fink who posted where the ATL/WTL wizard sleeps, to Mehmet Ozgul who posted the problems related to the Windows 9x, to John Noland who suggested the 8.3 problem solution on Windows 9x plus added the commands to extract another example (BmpView), and to many others who prove all the time that the lack of official WTL support does not mean that WTL is bad. Finally, I'd like to thank the one at CodeProject who corrected my English spelling errors, and spent the time with the updates.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Petr Prikryl
Software Developer
Czech Republic Czech Republic
Petr Prikryl works as a developer in a small software company since 1998. The C++ is the language that he wants to know better Wink | ;) . Python is the language which he started to use instead of Perl. The C# may be his choice in some future cases.
 
Earlier, he stayed with the University of Technology in Brno, Czech Republic. He graduated here (MSc., Computer Engineering) in 1988, worked here as a teacher until 1998, and got the Ph.D. degree (Informatics and Cybernetics) in 1999.
 
He likes cycling, tennis, and occasional skiing. But the dust is covering the sport equipment since his daughter (and of his wife) was born -- 2002.

Comments and Discussions

 
GeneralAlternative Pinmemberapraev22-Nov-09 19:39 
GeneralRe: Alternative PinmemberPetr Prikryl8-Dec-09 1:38 
GeneralWTL and VS .Net Pinmemberjoebarthib3-May-06 23:00 
GeneralRe: WTL and VS .Net PinmemberPetr Prikryl3-May-06 23:51 
GeneralRe: WTL and VS .Net Pinmemberjoebarthib4-May-06 1:34 
Generaldead cab link Pinmemberolol31-Jan-06 7:24 
GeneralRe: dead cab link PinmemberPetr Prikryl31-Jan-06 20:04 
GeneralWTL installed but..... Pinmemberolol1-Feb-06 6:51 
GeneralRe: WTL installed but..... Pinmemberdaveice30-Mar-06 3:55 
GeneralRe: WTL installed but..... PinmemberPetr Prikryl3-May-06 23:55 
Questionhow to install for vc6 Pinmembervikas amin23-Aug-05 22:08 
AnswerRe: how to install for vc6 PinmemberPetr Prikryl30-Aug-05 3:07 
GeneralWTL 7.0 available PinmemberPetr Prikryl8-Dec-03 20:37 
GeneralWTL 3.1 now available on MSDN Downloads PinmemberGavin Jerman26-Mar-01 20:42 
GeneralRe: WTL 3.1 now available on MSDN Downloads PinmemberMattyT27-Mar-03 19:44 
GeneralRe: WTL 3.1 now available on MSDN Downloads PinmemberPetr Prikryl27-Mar-03 21:48 
GeneralRe: WTL 3.1 now available on MSDN Downloads Pinmemberkanryu30-Nov-03 20:59 
GeneralRe: WTL 3.1 now available on MSDN Downloads PinmemberPetr Prikryl31-Mar-03 20:41 
GeneralRe: WTL 3.1 now available on MSDN Downloads PinmemberMattyT31-Mar-03 21:14 
GeneralModified Batch File with 8.3 filenames PinmemberJohn Noland16-Mar-01 12:29 
QuestionWhat to do if EXTRACT can't extract PinmemberMehmet Ozgul13-Mar-01 2:54 
AnswerRe: What to do if EXTRACT can't extract PinmemberPetr Prikryl13-Mar-01 22:35 
GeneralDoes anybody know how to extract? (was Re: What to do if EXTRACT can't extract) PinmemberPetr Prikryl14-Mar-01 3:11 
GeneralHere it is (Hopefuly) Re: Does anybody know how to extract? (was Re: What to do if EXTRACT can't extract) PinmemberMehmet Ozgul19-Mar-01 5:49 
I think I found a newer version of EXTRACT. In Win2K resource kit, and can be downloaded seperately. Around 590K. Almost half of the total download of the real objectiveSmile | :) FunnySmile | :)
 
http://www.microsoft.com/downloads/release.asp?releaseid=25119
 
I hope this will solve the extraction problems, I haven't tried.
 
By the chance, thanks to Petr. His patience on extracting real filenames saved me tons of unnecessary download.
 
Always have nice days,
 
Mehmet
 


GeneralNice! PinmemberBen Burnett11-Mar-01 11:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 5 Apr 2003
Article Copyright 2001 by Petr Prikryl
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid