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

Using WTL with Visual C++ 2005 Express Edition

By , 13 Jan 2006
 

Introduction

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.

History

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

License

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
Member
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.

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
Hint: For improved responsiveness ensure Javascript is enabled and choose 'Normal' from the Layout dropdown and hit 'Update'.
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
NewsFree Resource EditormemberGiermann29 Jun '10 - 21:17 
GeneralUsing Windows SDK instead of Platform SDK on VISTAmemberfranzzoa21 Jun '10 - 4:28 
GeneralBuilding x64 with VC ExpressmemberT800G5 Apr '10 - 6:39 
NewsATL 7.1 available!memberT800G27 Aug '09 - 11:24 
GeneralRe: ATL 7.1 available!membertlj499929 Jan '11 - 14:28 
AnswerDo it like thismemberT800G7 Jun '11 - 8:21 
NewsWTL 8.1memberT800G12 May '09 - 10:41 
Generalx64 warning!memberdataman64bit24 Aug '08 - 5:43 
GeneralATL only in Platform SDK 2003memberT800G2 Aug '08 - 14:26 
Generalvideo streamingmemberagachouch15 Jul '08 - 10:47 
Generalwindows vista + Windows (aka Platform) SDK + atlthunk.lib + winnt.h errors -- what worked for mememberMember 274734928 Apr '08 - 4:22 
QuestionVc 2008 express and WTL ?memberIvan Mladenovic19 Feb '08 - 1:39 
QuestionRe: Vc 2008 express and WTL ?memberKin Hoon4 Mar '08 - 2:38 
GeneralRe: Vc 2008 express and WTL ?memberIvan Mladenovic5 Mar '08 - 0:27 
GeneralRe: Vc 2008 express and WTL ?member9844062216 Mar '08 - 2:44 
AnswerRe: Vc 2008 express and WTL ?membertsehonkit23 Aug '08 - 6:53 
QuestionWTL wizzard doesn't workmemberMember 165025331 Jan '08 - 22:34 
AnswerRe: WTL wizzard doesn't workmemberoromero8 Jul '08 - 5:17 
QuestionError while creating a plugin for windows media player.memberamiya das4 Jan '08 - 2:08 
QuestionPlatform SDK = Windows SDK?memberreinux7 Sep '07 - 23:47 
NewsA Guide to WTL8.0 with VC++2005 expressmemberwbkang23 Jun '07 - 7:42 
QuestionOK, but where are atlcoll.h etc?memberCCanadaK3 Apr '07 - 18:21 
AnswerRe: OK, but where are atlcoll.h etc?memberEd Gadziemski22 Jan '09 - 10:30 
Questionmissing the atlthunk.lib ?memberFirkraag11 Nov '06 - 21:02 
AnswerRe: missing the atlthunk.lib ?memberNuno Esculcas9 Feb '07 - 8:20 
GeneralRe: missing the atlthunk.lib ?memberppaijwar28 Nov '07 - 8:41 
GeneralFree resource editor. Excellent.memberbigshlacker24 Oct '06 - 20:31 
GeneralRe: Free resource editor. Excellent.memberVladimir Svrkota7 Nov '06 - 8:00 
GeneralRe: Free resource editor. Excellent.memberBatmanstolemydog31 May '07 - 9:54 
GeneralRe: Free resource editor. Excellent.membergreegree2 Sep '07 - 21:15 
QuestionI followed all the instructions but ... [modified: English error was corrected]memberpiaoyh30 Sep '06 - 6:07 
AnswerI found the solution !memberpiaoyh6 Oct '06 - 12:52 
GeneralNot a complete solution.memberEoinoc28 Sep '06 - 11:20 
GeneralRe: Not a complete solution.memberBaryon Lee28 Sep '06 - 18:14 
GeneralRe: Not a complete solution.memberEoinoc29 Sep '06 - 0:37 
GeneralBest Free Resource Editormemberalgr200014 Jul '06 - 20:27 
GeneralWTL8.0 support VC2005ExpressmemberBaryon Lee19 Jun '06 - 13:05 
GeneralRe: WTL8.0 support VC2005Expressmemberlog1117 May '07 - 5:03 
Generalerrors with Vstudio8 express versionmemberwolky11 Jun '06 - 8:12 
GeneralRe: errors with Vstudio8 express versionmemberBaryon Lee19 Jun '06 - 12:58 
QuestionCan not insert ATL Simple Object in WTL7.5 with visual studio 2005memberjikanyanwin3228 May '06 - 16:30 
AnswerRe: Can not insert ATL Simple Object in WTL7.5 with visual studio 2005memberTony Ioanides22 Aug '06 - 20:44 
GeneralRe: Can not insert ATL Simple Object in WTL7.5 with visual studio 2005memberJohnnyMalaria25 Oct '06 - 8:17 
GeneralThank youmembermehrcpp28 May '06 - 11:36 
GeneralWTL Dialog applicationmemberamervelic7 May '06 - 5:00 
GeneralRe: WTL Dialog applicationmemberBaryon Lee8 May '06 - 5:15 
Generallinking errormemberbasil300019 Feb '06 - 10:17 
GeneralRe: linking errormemberbasil300019 Feb '06 - 11:25 
GeneralRe: linking errormemberjas603310 Dec '06 - 23:49 
GeneralRadasm resource editor problemsmembera1233454518 Feb '06 - 16:49 

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

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 13 Jan 2006
Article Copyright 2006 by Baryon Lee
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid