Jump to content
  • Advertisement
Sign in to follow this  
Calin

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

This topic is 4846 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
I did that (Project\Properties\Manifest Tool\ Use UNICODE response files-> No). But I still recive those errors.

Share this post


Link to post
Share on other sites
Thanks Konfusius that solved the problem! Thank you all guys!

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!