int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "degvbty", "243434", MB_OK);
return 0;
}
it compiles nicely ( Visual Studio 2013 ULT ) but it does not start, in task manager i can see that some sort of loading occurred.
Just go to project settings ->Configuration Properties->General->Character Set and set it to Use Multi-Byte Character Set. When you run it you will see your message box.
Yes i did it in VS2013 and changed to MByte set and this code i used here was test code and test did not work more detailed problem description is it compiles nicely no error but if i start it nothing happens and i can see in taskmanager that software is running and nothing happening same software runned nicely 2+ years ago on windows 7 like im am traying to run it now. i hate writing stuff not in my native language.
3. prefix your string literals with L, the wchar_t character type specifier: MessageBox(NULL, L"degvbty", L"243434", MB_OK);
http://www.cplusplus.com/doc/tutorial/constants/
4. wrap your string literals with the TEXT() macro: MessageBox(NULL, TEXT("degvbty"), TEXT("243434"), MB_OK);
https://msdn.microsoft.com/en-us/library/windows/desktop/dd374074%28v=vs.85%29.aspx
I personally prefer #4 so I can compile source with any compiler that can create Windows apps, Visual Studio or GCC/MinGW. A side benefit is I can change the character set usage, UNICODE or ANSI, and the same source should compile without change.