CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Siddhartha

Search: Search took 0.52 seconds.

  1. Replies
    13
    Views
    13,937

    Re: Converting char to LPCWSTR

    You can always use C++ std::string or std::wstring class by including <string>

    If your MSVC project is one with MFC support, you can also use CString (wraps TCHAR string).
  2. Replies
    13
    Views
    13,937

    Re: Converting char to LPCWSTR

    I hope you realize that the variable called text is not a string - it is a character.

    The correct code would be -

    const char* text = "Text."; And...
    ...Look, it actually told you just what I...
  3. Replies
    13
    Views
    13,937

    Re: Converting char to LPCWSTR

    You are welcome... ;)
  4. Replies
    13
    Views
    13,937

    Re: Converting char to LPCWSTR

    This -...even if it compiled fine is not correct.

    Your parameters are actually wrong.
    MessageBox API accepts a TCHAR string.

    The correct way to call it is -
    MessageBox(NULL,_T...
Results 1 to 4 of 4





Click Here to Expand Forum to Full Width

Featured