Mickael
07/07/2005, 16h47
Bonjour a tous,
J'ai ecris un tout petit programme avec un MessageBox juste pour tester si la compilation Marche bien, et comme par hazard : ERREUR.
Voici mon code :
#include <windows.h>
int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR Arguments, int nCmdShow)
{
MessageBox(NULL, "Un petit teste" , "Le teste du jour" , MB_OK);
return 0;
}
L'erreur :
------ Build started: Project: MessageBox, Configuration: Debug Win32 ------
Compiling...
Main.cpp
c:\documents and settings\mickael\mes documents\visual studio 2005\projects\messagebox\messagebox\main.cpp(5) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [15]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Mickael\Mes documents\Visual Studio 2005\Projects\MessageBox\MessageBox\Debug\BuildLog.htm"
MessageBox - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
J'ai ecris un tout petit programme avec un MessageBox juste pour tester si la compilation Marche bien, et comme par hazard : ERREUR.
Voici mon code :
#include <windows.h>
int WINAPI WinMain (HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR Arguments, int nCmdShow)
{
MessageBox(NULL, "Un petit teste" , "Le teste du jour" , MB_OK);
return 0;
}
L'erreur :
------ Build started: Project: MessageBox, Configuration: Debug Win32 ------
Compiling...
Main.cpp
c:\documents and settings\mickael\mes documents\visual studio 2005\projects\messagebox\messagebox\main.cpp(5) : error C2664: 'MessageBoxW' : cannot convert parameter 2 from 'const char [15]' to 'LPCWSTR'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
Build log was saved at "file://c:\Documents and Settings\Mickael\Mes documents\Visual Studio 2005\Projects\MessageBox\MessageBox\Debug\BuildLog.htm"
MessageBox - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========