Thread: Lpcwstr?

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    31

    Lpcwstr?

    I’m trying to tie a MFC GIU into Networking API, the samples for the API (console applications) compiles fine after the conversion to Visual C++ 2005 outside of a couple of warnings, but when I create a MFC dialog box, I haven’t even created any buttons or added event handlers to what was generated by default, and start include the of the headers files with the stock trading classes I get all these errors “XXXX : cannot convert parameter 1 from ‘const char *’ or ‘const char [106]’ to ‘LPCWSTR’? What does this mean, I haven’t changed any of the networking api code that would compile in the samples?

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    Sounds like your new project has UNICODE defined. You can either undefine UNICODE, or learn how to use unicode in your application. I prefer the second way since it allows your application to work for more than one language.

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    31
    How can I undefine unicode?

  4. #4
    Registered User
    Join Date
    Mar 2004
    Posts
    220
    First of all, I suggest you start supporting unicode.

    Second of all, if you're really bent on undefining Unicode this is how! Look in your project settings for a value called "Character set." There should be three options: "not set", "use unicode", "use multibyte." To switch to the ASCII character set (and effectively disable Unicode), set it to "not set"
    OS: Windows XP Pro CE
    IDE: VS .NET 2002
    Preferred Language: C++.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to convert string into LPCWSTR
    By krishnampkkm in forum C++ Programming
    Replies: 2
    Last Post: 06-15-2009, 06:02 AM
  2. message box LPCWSTR manipulation and keyword question
    By stanlvw in forum Windows Programming
    Replies: 11
    Last Post: 05-27-2008, 12:36 PM
  3. a type problem (TCHAR, LPCWSTR)
    By Crazed in forum Windows Programming
    Replies: 6
    Last Post: 03-13-2008, 01:19 PM
  4. The Interactive Animation - my first released C program
    By ulillillia in forum A Brief History of Cprogramming.com
    Replies: 48
    Last Post: 05-10-2007, 02:25 AM
  5. Lpcwstr
    By unregistered in forum Windows Programming
    Replies: 1
    Last Post: 07-08-2002, 03:02 PM