CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: How to get rid of unicode

  1. #1
    Join Date
    Aug 2000
    Posts
    18

    How to get rid of unicode

    I have finally decided to move into this century and am migrating some applications from VC 6 to Visual stusio 2008. I first need to upgrace some calss libraries I use, so I decided to build a small MFC application that used the libraries. Some way or other, I seem to have gotten unicode support turned on and I cannot find out where to turn it off for this project. The problem is it is using all sorts of different versions of string types and libraries to support them.

    thanks

  2. #2
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: How to get rid of unicode

    Project settings -> General, I believe.....maybe it's under C/C++.....but change the Character Set to multi-byte.

  3. #3
    Join Date
    Aug 2000
    Posts
    18

    Re: How to get rid of unicode

    Thanks for the response, but there is nothing there defined for C++. I can see that in winuser.h, unicode is defined. One example is that this statement is executed as if that is true:

    #ifdef UNICODE
    #define GetClassName GetClassNameW /* This is done *?
    #else
    #define GetClassName GetClassNameA
    #endif // !UNICODE

  4. #4
    Join Date
    Jun 2006
    Location
    M31
    Posts
    885

    Re: How to get rid of unicode

    I don't get how you missed it.

    In any case, you can either do it through the project properties (preferred), or:
    Code:
    #undef UNICODE
    #undef _UNICODE
    Before including Windows.h.
    Attached Images Attached Images  

  5. #5
    Join Date
    Aug 2000
    Posts
    18

    Re: How to get rid of unicode

    Thank you very much.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)