файл/Win 32 Priject, empty project (галочку поставил)
потом в Sourse files добавил файл *.срр вот и в нём вручную начал код писать.
Код: Выделить всё
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox( NULL, "Hellow!", "Hellow From message Box",MB_OK);
return 0;
}
в MSDN написано что MessageBox принимает 3 аргумента.
может быть то что в message Box 4 аргумента как-то связано с тем, что int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hRrevInstance,
и самая главная проблема с комплятором. не очень понятно где ошибка. он вообще пишет:
Код: Выделить всё
1>------ Build started: Project: Hello, Configuration: Debug Win32 ------
1>Compiling...
1>Hello.cpp
1>c:\documents and settings\дима\мои документы\visual studio 2008\projects\project1\hello\hello.cpp(4) : error C2731: 'WinMain' : function cannot be overloaded
1> c:\documents and settings\дима\мои документы\visual studio 2008\projects\project1\hello\hello.cpp(2) : see declaration of 'WinMain'
1>Build log was saved at "file://c:\Documents and Settings\Дима\Мои документы\Visual Studio 2008\Projects\Project1\Hello\Debug\BuildLog.htm"
1>Hello - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========