Setting up DirectX framework in Visual Studio 2005 Express Beta 2. *solved*

Started by
4 comments, last by Calin 18 years, 8 months ago
I am using VS 2005 Express Beta 2 to compile my code. I have a problem setting up my DirectX framework. Here are the errors:

c:\documents and settings\calin\my documents\visual studio 2005\projects\cadru sg\vertices.cpp(203) : error C2440: 'initializing' : cannot convert from 'const char [13]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\calin\my documents\visual studio 2005\projects\cadru sg\vertices.cpp(209) : error C2664: 'CreateWindowExW' : cannot convert parameter 2 from 'const char [13]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
c:\documents and settings\calin\my documents\visual studio 2005\projects\cadru sg\vertices.cpp(237) : error C2664: 'UnregisterClassW' : cannot convert parameter 1 from 'const char [13]' to 'LPCWSTR'
        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast


I have the Microsoft Platform SDK installed and I can build windows applications. If you have any clue I would appreciate your help. [Edited by - Calin on August 9, 2005 1:46:43 PM]

My project`s facebook page is “DreamLand Page”

Advertisement
Either turn off unicode or make it compliant.
This is not a problem with the DirectX framework. It has to do with Visual Studio 2005 beta defaulting to unicode strings over ASCII strings. You can change this in your project properties. But if you don't want to do that, you can change your chars to wchars and string literals ("") to L"" or _T"". Another option is to simply use the ASCII versions of those functions. Instead of calling CreateWindowEx or CreateWindowExW, call CreateWindowExA and this will fix your problem. Do the same to UnregisterClassA and any other functions suffixed with W.
....[size="1"]Brent Gunning
I did that (Project\Properties\Manifest Tool\ Use UNICODE response files-> No). But I still recive those errors.

My project`s facebook page is “DreamLand Page”

Project/Properties/Configuration Properties/General/Character Set
Thanks Konfusius that solved the problem! Thank you all guys!

[Edited by - Calin on August 9, 2005 3:42:57 PM]

My project`s facebook page is “DreamLand Page”

This topic is closed to new replies.

Advertisement