what would be the correct syntax and how would i run this?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: what would be the correct syntax and how would i run this?

  1. #1
    Join Date
    Oct 2012
    Posts
    18

    what would be the correct syntax and how would i run this?

    DWORD XShowMessageBoxUI( DWORD dwUserIndex, LPCWSTR wszTitle, LPCWSTR wszText, DWORD cButtons, LPCWSTR *pwszButtons, DWORD dwFocusButton, DWORD dwFlags, MESSAGEBOX_RESULT *pResult, XOVERLAPPED *pOverlapped )

  2. #2
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    this might help you guys out with what i mean
    this is the documentation of what i am doing
    picture 1 top of page
    Name:  3676b032e5697ea8f9a606a053012039.png
Views: 168
Size:  48.2 KB
    picture 2 bottom of the page
    Name:  7bd9038d99b2547120f2df59d6dad9c4.png
Views: 169
Size:  75.0 KB

  3. #3
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,062

    Re: what would be the correct syntax and how would i run this?

    Doesn't the documentation says it all?
    Do you have a problem with a specific parameter?

  4. #4
    Join Date
    Jun 2002
    Location
    Stockholm, Sweden
    Posts
    1,618

    Re: what would be the correct syntax and how would i run this?

    If you don't understand the documentation, your best bet is probably to google for the function name and find code examples of how someone else used it. For example:

    http://forums.xbox-scene.com/lofiver...p/t706895.html
    Nobody cares how it works as long as it works

  5. #5
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by Marc G View Post
    Doesn't the documentation says it all?
    Do you have a problem with a specific parameter?
    no i just dont understand the syntax that well i want someone to show me what to change in it to my liking and how to do it

  6. #6
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    i mean like how would i do it like this
    DWORD XShowMessageBoxUI(DWORD dwUserIndex,LPCWSTR wszTitle,LPCWSTR wszText,DWORD cButtons,LPCWST *pwszButtons,DWORD dwFocusButton,DWORD dwFlags,MESSAGEBOX_RESULT *pResult,XOVERLAPPED *pOverlapped);
    or what i really dont know the bit is confusing me is the ( ) instead of the { } i dont understand and want somone to explain

  7. #7
    Join Date
    Apr 1999
    Posts
    27,433

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by theunknowncoder View Post
    no i just dont understand the syntax that well i want someone to show me what to change in it to my liking and how to do it
    The documentation is clear -- the function is defined, all parameters are described, etc.

    It is assumed that the person reading the documentation already knows the C or C++ language. Documentation for library and library functions should not be used as a tutorial in learning the language. You need to learn the C++ language first (to the point you know what functions are, how to call them, what pointers are and how to use them), before you understand technical documentation such as what you've presented.

    Regards,

    Paul McKenzie

  8. #8
    Join Date
    Apr 1999
    Posts
    27,433

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by theunknowncoder View Post
    i mean like how would i do it like this

    or what i really dont know the bit is confusing me is the ( ) instead of the { } i dont understand and want somone to explain
    That "someone" is a book on C++ or a good basic tutorial on the C++ language. You're asking basic C++ questions that are better answered by books and tutorials.

    Regards,

    Paul McKenzie

  9. #9
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by Paul McKenzie View Post
    The documentation is clear -- the function is defined, all parameters are described, etc.

    It is assumed that the person reading the documentation already knows the C or C++ language. Documentation for library and library functions should not be used as a tutorial in learning the language. You need to learn the C++ language first (to the point you know what functions are, how to call them, what pointers are and how to use them), before you understand technical documentation such as what you've presented.

    Regards,

    Paul McKenzie
    thats why i came here for help i know some cpp but not all i just wanted somone to give me a little tip as i have been trying to work it out for hours i have not just looked at it and thought i cant do that and posted on here i looked at it for hours and tried it many different ways

  10. #10
    Join Date
    Apr 1999
    Posts
    27,433

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by theunknowncoder View Post
    thats why i came here for help i know some cpp but not all i just wanted somone to give me a little tip
    Again, the function is completely documented. What is required is that you know how to read the documentation, and it seems you don't know how to read documentation to C++ functions.

    The authors of the documentation assume you know C++ already -- the authors have done what is required to relay the information to you on what is required to call the function (that's why you had the earlier response of "the documentation says it all"). The only thing missing is example of usage in a mock function or code, but that can probably be found by doing a web search.

    All this suggests that you do not know C++ enough to understand how to call functions, and learning how to do that is done by books and tutorials, not a programming board such as CodeGuru. I could understand if you wrote a valid program (compiled, linked, etc.), and at runtime the function call failed (error return code, exception thrown, etc.), but what you're stating is that you don't understand basic C++ syntax with respect to calling functions and therefore can't write your program.
    i have been trying to work it out for hours i have not just looked at it and thought i cant do that and posted on here i looked at it for hours and tried it many different ways
    You should post your attempts.

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; October 5th, 2012 at 12:24 PM.

  11. #11
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by Marc G View Post
    Doesn't the documentation says it all?
    Do you have a problem with a specific parameter?
    yes i do m8 i got this so far
    DWORD XShowMessageBoxUI(DWORD dwUserIndex,LPCWSTR wszTitle,LPCWSTR wszText,DWORD cButtons,LPCWSTR *pwszButtons,DWORD dwFocusButton,DWORD dwFlags,MESSAGEBOX_RESULT *pResult,XOVERLAPPED *pOverlapped)
    and then i have this
    z = XShowMessageBoxUI (XUSER_INDEX_ANY,L"Stelth V1",L"Thanks For Chossing Stelth V1. Stelth V1 Is Now Fully Loaded. HAVE FUN!!!",1,L"Play Modz",1,XMB_ALERTICON,NULL,NULL);
    but the L on the play modz gives me this error
    Error: argument of type "const wchar_t*" is incompatible with parameter of type "LPCWSTR *"

  12. #12
    Join Date
    Apr 1999
    Posts
    27,433

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by theunknowncoder View Post
    but the L on the play modz gives me this error
    Error: argument of type "const wchar_t*" is incompatible with parameter of type "LPCWSTR *"
    Did you read the documentation carefully? That argument is supposed to be an array of Unicode strings, not a Unicode string.

    Look at the cButtons argument -- did you read the description? What if you had 2 or more buttons? How would you specify these buttons in that function call?

    So the next question is this -- do you know what an array is and how to pass this array of strings?

    Regards,

    Paul McKenzie
    Last edited by Paul McKenzie; October 6th, 2012 at 09:12 PM.

  13. #13
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by Paul McKenzie View Post
    Did you read the documentation carefully? That argument is supposed to be an array of Unicode strings, not a Unicode string.

    Look at the cButtons argument -- did you read the description? What if you had 2 or more buttons? How would you specify these buttons in that function call?

    So the next question is this -- do you know what an array is and how to pass this array of strings?

    Regards,

    Paul McKenzie
    i done it all but i am stuck on the last 2 args now i just dont understand them at all no offence but the documentation just makes things harder

  14. #14
    Join Date
    Apr 1999
    Posts
    27,433

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by theunknowncoder View Post
    i done it all but i am stuck on the last 2 args now i just dont understand them
    You don't understand pointers? In fact, how can you write a coherent, C++ program without knowing what pointers are, how to use them, and how to read simple documentation? I'm sure your program isn't just one line.
    at all no offence but the documentation just makes things harder
    As I stated earlier to you, the documentation assumes you know C++. If you don't know C++, then of course you won't understand the documentation. I don't know how much simpler I can make this point to you.

    This is how every author who is responsible enough documents their functions. Get used to it (meaning this -- learn C++ properly, and you won't get confused).

    Regards,

    Paul McKenzie

  15. #15
    Join Date
    Oct 2012
    Posts
    18

    Re: what would be the correct syntax and how would i run this?

    Quote Originally Posted by Paul McKenzie View Post
    You don't understand pointers? In fact, how can you write a coherent, C++ program without knowing what pointers are, how to use them, and how to read simple documentation? I'm sure your program isn't just one line.
    As I stated earlier to you, the documentation assumes you know C++. If you don't know C++, then of course you won't understand the documentation. I don't know how much simpler I can make this point to you.

    This is how every author who is responsible enough documents their functions. Get used to it (meaning this -- learn C++ properly, and you won't get confused).

    Regards,

    Paul McKenzie
    ok so i read up abit on c++ learnt it for about 5 hours and got use to the syntax i was reading about pointers and can i ask how you do a pointer to a function?

Page 1 of 2 12 LastLast

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

This is a CodeGuru survey question.


Featured


HTML5 Development Center