error C2664: 'CWnd::MessageBoxW' : cannot convert parameter 1 from 'const char [1]' to 'LPCTSTR'

plz send me: [email removed -Narue]
thanks

There are two versions of MessageBox -- one for UNICODE (the W at the end) and one for single-byte languages such as English (and has an A at the end). The error message makes it obvious you are compiling your program for UNICODE with requires wchar_t* instead of char* as the first argument. One of two solutions:

1. convert the arguments to unicode by surrounding the text with _TEXT macto like this _TEXT("Hello World") 2. Don't compile for UNICODE How to do that depends on the compiler and for Microsoft it depends on the version of the compiler.

[edit]which is exactly the same suggestion as posted by theKashyap, above [/edit]

There are two versions of MessageBox -- one for UNICODE (the W at the end) and one for single-byte languages such as English (and has an A at the end). The error message makes it obvious you are compiling your program for UNICODE with requires wchar_t* instead of char* as the first argument. One of two solutions:

1. convert the arguments to unicode by surrounding the text with _TEXT macto like this _TEXT("Hello World") 2. Don't compile for UNICODE How to do that depends on the compiler and for Microsoft it depends on the version of the compiler.

[edit]which is exactly the same suggestion as posted by theKashyap, above [/edit]

thank a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.