Getting started with WTL on Visual Studio 2010

January 22, 2011

WTL on Visual Studio 2010

Now that you have downloaded the latest WTL release (v8.1 at the time of this writing), you will find out that it doesn’t have any project wizards for Visual Studio 2010. That’s a relatively easily fix. Just go ahead and download the latest build from the repository at AppWiz.tar.gz-view=tar. Extract the .tar file and you will find the JavaScript install scripts for VS 2010:

image

I recommend you to extract the files to the same location were you installed the WTL files. In my case this would be c:\WTL.  Double click the setup100.js file (or setp100x.js for Visual Studio 2010 Express) to install the WTL Project Wizard.

Add the WTL include path to the default include directories

One thing you may have noticed in VS2010 (compared to earlier versions) is that there is no way to set the global paths of VC++ directories in Tools->Options:

image

Bummer. How to solve that? You really don’t want to have to include the WTL include path in every VC++ project. Here’s how to set the global paths and include the WTL include path. It’s really not that intuitive, if I would say.

First you will need to have a project open in VS 2010. Then go to View->Other Windows->Property Manager. In the Property Manager, expand the project and the platforms nodes. Multi-select the two Microsoft.Cpp.Win32.user items. (By holding down the Ctrl key and select them each by the mouse).

image

Right click and select properties

image

Now you finally can set the global default search paths for the VC++ include directories. In my case I have added the C:\WTL\Include path. Save the properties settings restart Visual Studio.

If you open one of the samples in the WTL folders, you may stumble upon a peculiar error that says: error CVT1100: duplicate resource.  type:MANIFEST, name:1, language:0×0409

image

This is because the way manifest files are handled in VS 2010 has changed. What you can do is to open the resource file (.rc), edit it by selecting “View Code” and remark out the line

Now, happy WTL’ing in Visual Studio 2010.

posted in Code by Magnus Johansson

Follow comments via the RSS Feed | Leave a comment | Trackback URL

4 Comments to "Getting started with WTL on Visual Studio 2010"

  1. ottar arne skår wrote:

    Hi All
    I have downloaded the latest WTL version (build 11324) 11/20/11 and installed it on VS 2008 and VS 2010. It works fine on VS2008 – on VS2010 this is what happens;
    • The installation of setup100.js runs OK.
    • I click New Project
    • Select ATL/WTL Application Wizard.and enter a project name.
    • The Welcome to the WTL Application Wizard dialog appear (the list of current project settings is empty).
    • The dialog Internet Explorer Script Error dialog pops up saying “An error has occurred in the script on the page” Line: 1, Char: 1, Error: Invalid character, Code:0; Url: file:///…./1033/Script.js
    • I click Yes
    • The dialog Internet Explorer Script Error dialog pops up saying “An error has occurred in the script on the page” Line: 1, Char: 1, Error: Invalid character, Code:0; Url: file:///…./1033/Common.js
    • I click Yes
    • The dialog Internet Explorer Script Error dialog pops up saying “An error has occurred in the script on the page” Line: 395, Char: 2, Error: Object expected, Code:0; Url: file:///…./1033/default.htm
    The list of errors continues if I click Application Type or User Interface Features or Finish. I have to click Cancel to exit the dialog.
    The wizard fails the same way on a VS 2010 installed on Windows 7 64 bit (Home) and Windows XP 32 bit (professional) all English OS. Does anybody else experience this or have a fix?

  2. John wrote:

    I’m getting almost the same thing. Anyone have a fix?

  3. Hartmut wrote:

    This is a security problem. The wizard files are marked as unsecure.

    Solution: download the wtl zip file again (wtl81_11324.zip), unzip it (I used 7zip) and install the AppWiz again (setup100x.js for VS 2010 express)

    Important: Do not open the zip file via click on the downloaded file and copy & paste the files contained in the zip to the new destination. This will mark the file as unsecure. You see this with rightclick|properties on the file. At the bottom of the first page you see: (german)”Die Datei stammt von einem anderen Computer. Der Zugriff wurde aus Sicherheitsgründen eventuell blockiert”
    Google translates this to “The file came from another computer. Access is blocked possibly for security reasons”

  4. Sprinter Man wrote:

    i like your blog fancy selling ?

Leave Your Comment

 
Powered by Wordpress and MySQL. Theme by Shlomi Noach, openark.org