Including UNICODE in VC++

This is a discussion on Including UNICODE in VC++ within the C++ Programming forums, part of the General Programming Boards category; In order for me to use Direct3D's GUI I must make my build a unicode build. Microsoft had steps for ...

  1. #1
    www.gamingdl.com gamingdl'er's Avatar
    Join Date
    Nov 2005
    Posts
    27

    Including UNICODE in VC++

    In order for me to use Direct3D's GUI I must make my build a unicode build. Microsoft had steps for this, but it still wouldn't work because it wasn't for my compiler. Plus the steps(as usual) weren't too good.
    Visit www.gamingdl.com - A gaming download database
    *Complete and ready for you!

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    what compiler are you using?

  3. #3
    www.gamingdl.com gamingdl'er's Avatar
    Join Date
    Nov 2005
    Posts
    27
    Its on the title, VC++
    Visit www.gamingdl.com - A gaming download database
    *Complete and ready for you!

  4. #4
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    #define UNICODE
    #define _UNICODE

    but do it for the project in the project settings and not on a per file basis.

    Use TCHAR instead of char (or std::wstring, or typedef a type based on std::basic_string using TCHAR). It won't hurt to include tchar.h. Use the TEXT or _T macros to convert string literals or just use L"string", where "string" is whatever string literal you're using, to force them to wide characters in the first place.

    If that isn't clear then you should provide more information regarding what steps you've already taken, the code you're trying to convert and any errors you may be getting.

    If you haven't already done so, search the boards as there's been a number of unicode discussions in the past that may be of some interest to you.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  5. #5
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    Quote Originally Posted by gamingdl'er
    Its on the title, VC++
    there have been quite a few versions of VC++ -- version 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 and 8.0. And there are several versions of the MS-DOS compiler too. Then for WinCE there is eVC++ 3.0 and eVC++ 4.0.

    I use VC++ 6.0 with UNICODE all the time and have no problems with it.

  6. #6
    www.gamingdl.com gamingdl'er's Avatar
    Join Date
    Nov 2005
    Posts
    27
    My question is how to I add it to my project... Anyways, much thanks on answering it!
    Visit www.gamingdl.com - A gaming download database
    *Complete and ready for you!

  7. #7
    www.gamingdl.com gamingdl'er's Avatar
    Join Date
    Nov 2005
    Posts
    27
    And I've already got that included, it still won't work. This is so fustrating Im ready to pull my hair out. I've followed every step.

    I have to say, my problems arn't just because of the UNICODE, I get errors from Direct3D's GUI's files all over the place. This is VERY annoying. I cannot figure out how to use this GUI and Im really about to give up.
    Last edited by gamingdl'er; 12-08-2005 at 05:06 PM.
    Visit www.gamingdl.com - A gaming download database
    *Complete and ready for you!

  8. #8
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Or you might consider actually providing some real information that will help us to help you, as has already been suggested, such as:

    version of your compiler
    problematic code
    compiler errors you are getting with that problematic code.

    [edit]

    >>My question is how to I add it to my project<<

    msdn: visual studio .net project preprocessor definitions. Similar idea for other versions of msvc.

    [/edit]
    Last edited by Ken Fitlike; 12-08-2005 at 05:47 PM.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 04:02 AM
  2. <string> to LPCSTR? Also, character encoding: UNICODE vs ?
    By Kurisu33 in forum C++ Programming
    Replies: 7
    Last Post: 10-09-2006, 12:48 AM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Should I go to unicode?
    By nickname_changed in forum C++ Programming
    Replies: 10
    Last Post: 10-13-2003, 11:37 AM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21