Click here to Skip to main content
6,291,722 members and growing! (13,537 online)
Email Password   helpLost your password?
Platforms, Frameworks & Libraries » WTL » General     Intermediate

Using WTL with Visual C++ 2005 Express Edition

By Baryon Lee

This article explains the procedure for using WTL with Visual Studio 2005 Express edition.
VC8.0, Windows, WTL, VS2005, Dev
Posted:13 Jan 2006
Views:197,244
Bookmarked:56 times
Announcements
Loading...
 
Search    
Advanced Search
printPrint   Broken Article?Report       add Share
  Discuss Discuss   Recommend Article Email
33 votes for this article.
Popularity: 7.12 Rating: 4.69 out of 5
1 vote, 3.0%
1

2
1 vote, 3.0%
3
4 votes, 12.1%
4
27 votes, 81.8%
5

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

About the Author

Baryon Lee


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.

Occupation: Web Developer
Location: Japan Japan

Other popular WTL articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 72 (Total in Forum: 72) (Refresh)FirstPrevNext
NewsWTL 8.1 PinmemberT800G11:41 12 May '09  
Generalx64 warning! Pinmemberdataman64bit6:43 24 Aug '08  
GeneralSomebody please confirm PinmemberT800G9:03 16 Sep '08  
GeneralATL only in Platform SDK 2003 PinmemberT800G15:26 2 Aug '08  
Generalvideo streaming Pinmemberagachouch11:47 15 Jul '08  
Generalwindows vista + Windows (aka Platform) SDK + atlthunk.lib + winnt.h errors -- what worked for me PinmemberMember 27473495:22 28 Apr '08  
QuestionVc 2008 express and WTL ? PinmemberIvan Mladenovic2:39 19 Feb '08  
QuestionRe: Vc 2008 express and WTL ? PinmemberKin Hoon3:38 4 Mar '08  
GeneralRe: Vc 2008 express and WTL ? PinmemberIvan Mladenovic1:27 5 Mar '08  
GeneralRe: Vc 2008 express and WTL ? Pinmember984406223:44 16 Mar '08  
AnswerRe: Vc 2008 express and WTL ? Pinmembertsehonkit7:53 23 Aug '08  
QuestionWTL wizzard doesn't work PinmemberMember 165025323:34 31 Jan '08  
AnswerRe: WTL wizzard doesn't work Pinmemberoromero6:17 8 Jul '08  
QuestionError while creating a plugin for windows media player. Pinmemberamiya das3:08 4 Jan '08  
GeneralPlatform SDK = Windows SDK? Pinmemberreinux0:47 8 Sep '07  
NewsA Guide to WTL8.0 with VC++2005 express Pinmemberwbkang8:42 23 Jun '07  
QuestionOK, but where are atlcoll.h etc? PinmemberCCanadaK19:21 3 Apr '07  
AnswerRe: OK, but where are atlcoll.h etc? PinmemberEd Gadziemski11:30 22 Jan '09  
Questionmissing the atlthunk.lib ? PinmemberFirkraag22:02 11 Nov '06  
AnswerRe: missing the atlthunk.lib ? PinmemberNuno Esculcas9:20 9 Feb '07  
GeneralRe: missing the atlthunk.lib ? Pinmemberppaijwar9:41 28 Nov '07  
GeneralFree resource editor. Excellent. Pinmemberbigshlacker21:31 24 Oct '06  
GeneralRe: Free resource editor. Excellent. PinmemberVladimir Svrkota9:00 7 Nov '06  
GeneralRe: Free resource editor. Excellent. PinmemberBatmanstolemydog10:54 31 May '07  
GeneralRe: Free resource editor. Excellent. Pinmembergreegree22:15 2 Sep '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 13 Jan 2006
Editor: Smitha Vijayan
Copyright 2006 by Baryon Lee
Everything else Copyright © CodeProject, 1999-2009
Web11 | Advertise on the Code Project