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

Threaded View

  1. #5
    Join Date
    Apr 1999
    Posts
    27,449

    Re: help with strings

    Quote Originally Posted by theunknowncoder View Post
    ok so then on it all works fine untill it gets to the L"Play Modz" for the LPCWSTR *pwszButtons and then it gives me thist error
    Of course it gives you an error. Just as I responded to you in your other thread, that argument is not supposed to be a string. It is supposed to be an array of strings. The argument is an LPCWSTR*, not an LPCWSTR (see the * at the end of the first one).
    Code:
    LPCWSTR myStrings [] = {L"Play Modz"};
    z = XShowMessageBoxUI (XUSER_INDEX_ANY,L"Stelth V1",L"Thanks For Chossing Stelth V1. Stelth V1 Is Now Fully Loaded. HAVE FUN!!!",1, myStrings ,1,XMB_ALERTICON,NULL,NULL);
    I'll ask you the same question I asked in the other thread -- if you had 2 buttons, how would you have specified them in that function call? That's why you must use an array.
    Code:
    LPCWSTR myStrings [] = {L"Play Modz", L"Some Text"};
    z = XShowMessageBoxUI (XUSER_INDEX_ANY,L"Stelth V1",L"Thanks For Chossing Stelth V1. Stelth V1 Is Now Fully Loaded. HAVE FUN!!!", 2, myStrings ,1,XMB_ALERTICON,NULL,NULL);
    Do you see the code in red? I now have 2 strings, so my arguments are now 2, and the array of strings.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; October 7th, 2012 at 12:33 AM.

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured