Click here to Skip to main content
12,299,109 members (44,826 online)
Click here to Skip to main content
Add your own
alternative version


69 bookmarked

Using WTL with Visual C++ 2005 Express Edition

, 13 Jan 2006 CPOL
Rate this:
Please Sign up or sign in to vote.
This article explains the procedure for using WTL with Visual Studio 2005 Express edition.


Visual C++ 2005 Express Edition was released on 11/7/2005. It has a great native C++ compiler and a smart editor. The best thing is that it is free. We can use it for our WTL programming for free. I posted the procedure for the same here on 11/9/2005. Now, I am submitting it to CodeProject.

Step by step

  1. Download and install Visual C++ 2005 Express Edition from MSDN.
  2. Download and install the Platform SDK, and update the Visual C++ setting as detailed here.
  3. Update the Visual C++ directories in the Projects section of the Options dialog box. Add the ATL path to the Include files (the path shown is the default, use the path to your actual location):
    C:\Program Files\Microsoft Platform SDK\include\atl
  4. Change atlwin.h and atlbase.h in the ATL folder of the Platform SDK install as follows:
    • Change SetChainEntry function at line 1725 of atlwin.h - define "int i" at the first line of the function body.
      BOOL SetChainEntry(DWORD dwChainID, CMessageMap* pObject, DWORD
      dwMsgMapID = 0)
          int i;
          // first search for an existing entry
          for(i = 0; i < m_aChainEntry.GetSize(); i++)
    • Change AllocStdCallThunk and FreeStdCallThunk at line 287 of atlbase.h to the new macros:
      /* Comment it
      PVOID __stdcall __AllocStdCallThunk(VOID);
      VOID __stdcall __FreeStdCallThunk(PVOID);
      #define AllocStdCallThunk() __AllocStdCallThunk()
      #define FreeStdCallThunk(p) __FreeStdCallThunk(p)
      #pragma comment(lib, "atlthunk.lib")
      #define AllocStdCallThunk() HeapAlloc(GetProcessHeap(), 
                                    0, sizeof(_stdcallthunk))
      #define FreeStdCallThunk(p) HeapFree(GetProcessHeap(), 0, p)
  5. Download and install WTL from SourceForge:
  6. Download the AppWizard for Visual Studio 2005 Express from the link above this page, unzip and copy the JS file into the WTL\AppWiz folder, double click it to install the WTL Wizard into VC Express.

Enjoy WTL and VC Express free!

Some Problems

Because VC++ Express doesn't include a "Resource Editor", you will get an error when creating a Dialog or FormView. But, once the project and source files are created, you can open the project directly. If you can find a free resource editor, please tell me.

Comments: rvRoman told us of a free resource editor, and tsehonkit gave us a right link.


  • 1/12/2006 - first submit, for WTL7.5.
  • 1/27/2006 - fixed an editing error.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Baryon Lee
Web Developer
Japan Japan
I write software and share it to make our life more easy and interesting.
Welcome to my site:Share our software. Love Programming, Love Life.

You may also be interested in...

Comments and Discussions

GeneralFree resource editor. Excellent. Pin
bigshlacker24-Oct-06 20:31
memberbigshlacker24-Oct-06 20:31 
GeneralRe: Free resource editor. Excellent. Pin
Vladimir Svrkota7-Nov-06 8:00
memberVladimir Svrkota7-Nov-06 8:00 
GeneralRe: Free resource editor. Excellent. Pin
Batmanstolemydog31-May-07 9:54
memberBatmanstolemydog31-May-07 9:54 
GeneralRe: Free resource editor. Excellent. Pin
greegree2-Sep-07 21:15
membergreegree2-Sep-07 21:15 
QuestionI followed all the instructions but ... [modified: English error was corrected] Pin
piaoyh30-Sep-06 6:07
memberpiaoyh30-Sep-06 6:07 
AnswerI found the solution ! Pin
piaoyh6-Oct-06 12:52
memberpiaoyh6-Oct-06 12:52 
GeneralNot a complete solution. Pin
Eoinoc28-Sep-06 11:20
memberEoinoc28-Sep-06 11:20 
GeneralRe: Not a complete solution. Pin
Baryon Lee28-Sep-06 18:14
memberBaryon Lee28-Sep-06 18:14 
GeneralRe: Not a complete solution. Pin
Eoinoc29-Sep-06 0:37
memberEoinoc29-Sep-06 0:37 
GeneralBest Free Resource Editor Pin
algr200014-Jul-06 20:27
memberalgr200014-Jul-06 20:27 
GeneralWTL8.0 support VC2005Express Pin
Baryon Lee19-Jun-06 13:05
memberBaryon Lee19-Jun-06 13:05 
GeneralRe: WTL8.0 support VC2005Express Pin
log1117-May-07 5:03
memberlog1117-May-07 5:03 
Generalerrors with Vstudio8 express version Pin
wolky11-Jun-06 8:12
memberwolky11-Jun-06 8:12 
GeneralRe: errors with Vstudio8 express version Pin
Baryon Lee19-Jun-06 12:58
memberBaryon Lee19-Jun-06 12:58 
QuestionCan not insert ATL Simple Object in WTL7.5 with visual studio 2005 Pin
jikanyanwin3228-May-06 16:30
memberjikanyanwin3228-May-06 16:30 
AnswerRe: Can not insert ATL Simple Object in WTL7.5 with visual studio 2005 PinPopular
Tony Ioanides22-Aug-06 20:44
memberTony Ioanides22-Aug-06 20:44 
GeneralRe: Can not insert ATL Simple Object in WTL7.5 with visual studio 2005 Pin
JohnnyMalaria25-Oct-06 8:17
memberJohnnyMalaria25-Oct-06 8:17 
GeneralThank you Pin
mehrcpp28-May-06 11:36
membermehrcpp28-May-06 11:36 
GeneralWTL Dialog application Pin
amervelic7-May-06 5:00
memberamervelic7-May-06 5:00 
GeneralRe: WTL Dialog application Pin
Baryon Lee8-May-06 5:15
memberBaryon Lee8-May-06 5:15 
Generallinking error Pin
basil300019-Feb-06 10:17
memberbasil300019-Feb-06 10:17 
GeneralRe: linking error Pin
basil300019-Feb-06 11:25
memberbasil300019-Feb-06 11:25 
GeneralRe: linking error Pin
jas603310-Dec-06 23:49
memberjas603310-Dec-06 23:49 
GeneralRadasm resource editor problems Pin
a1233454518-Feb-06 16:49
membera1233454518-Feb-06 16:49 
GeneralRe: Radasm resource editor problems Pin
amervelic7-May-06 5:05
memberamervelic7-May-06 5:05 
QuestionRe: Radasm resource editor problems Pin
constant_cpp18-Jul-06 2:11
memberconstant_cpp18-Jul-06 2:11 
Generalworks man ! Pin
Emil NEAGU9-Feb-06 1:25
memberEmil NEAGU9-Feb-06 1:25 
Generalerror C2065: '_Module' : undeclared identifier Pin
john bond3-Feb-06 7:10
memberjohn bond3-Feb-06 7:10 
GeneralRe: error C2065: '_Module' : undeclared identifier Pin
lanepaul16-Aug-06 23:00
memberlanepaul16-Aug-06 23:00 
Generalneed atl.lib Pin
Navi30-Jan-06 10:19
memberNavi30-Jan-06 10:19 
GeneralRe: need atl.lib Pin
mb2sync6-Feb-06 20:49
membermb2sync6-Feb-06 20:49 
GeneralNot working :( Pin
Guybrush25-Jan-06 3:30
memberGuybrush25-Jan-06 3:30 
GeneralRe: Not working :( Pin
Florin Tanasa26-Jan-06 7:46
memberFlorin Tanasa26-Jan-06 7:46 
GeneralRe: Not working :( Pin
Baryon Lee26-Jan-06 17:06
memberBaryon Lee26-Jan-06 17:06 
GeneralRe: Not working :( Pin
Baryon Lee26-Jan-06 22:14
memberBaryon Lee26-Jan-06 22:14 
GeneralRe: Not working :( Pin
Florin Tanasa26-Jan-06 23:15
memberFlorin Tanasa26-Jan-06 23:15 
GeneralRe: Not working :( Pin
Guybrush28-Jan-06 2:39
memberGuybrush28-Jan-06 2:39 
GeneralRe: Not working :( Pin
Guybrush14-Feb-06 6:36
memberGuybrush14-Feb-06 6:36 
Generalwtl with gcc Pin
Gulli19-Jan-06 4:39
memberGulli19-Jan-06 4:39 
GeneralRe: wtl with gcc Pin
cristianadam23-Jan-06 0:32
membercristianadam23-Jan-06 0:32 
GeneralRe: wtl with gcc Pin
Sebastian Pipping4-Feb-06 16:20
memberSebastian Pipping4-Feb-06 16:20 
Questioncan not find alt Pin
eric_suen17-Jan-06 15:57
membereric_suen17-Jan-06 15:57 
AnswerRe: can not find alt Pin
Baryon Lee17-Jan-06 17:54
memberBaryon Lee17-Jan-06 17:54 
GeneralResource Editor Pin
rvRoman15-Jan-06 12:46
memberrvRoman15-Jan-06 12:46 
GeneralRe: Resource Editor Pin
Kin Hoon18-Jan-06 16:13
memberKin Hoon18-Jan-06 16:13 
GeneralRe: Resource Editor Pin
rvZarathustra18-Jan-06 21:15
memberrvZarathustra18-Jan-06 21:15 
GeneralRe: Resource Editor Pin
pomalo17-May-06 4:01
memberpomalo17-May-06 4:01 
GeneralRe: Resource Editor Pin
Gulli19-Jan-06 4:30
memberGulli19-Jan-06 4:30 
GeneralRe: Resource Editor Pin
tsehonkit23-Jan-06 16:48
membertsehonkit23-Jan-06 16:48 
GeneralVery useful Pin
Nishant Sivakumar14-Jan-06 1:35
staffNishant Sivakumar14-Jan-06 1:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    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 | Terms of Use | Mobile
Web02 | 2.8.160525.2 | Last Updated 13 Jan 2006
Article Copyright 2006 by Baryon Lee
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid