Hello,
when I compile the following code with GNU GCC Comp. and execute (from the Windows Explorer) the .exe file, first a DOS Box is opened, and then the MessageBox appears.
How can I avoid the DOS Box to appear?
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
MessageBox(NULL, "test", "Hello!", MB_OK);
return 0;
}
I tried it with CodeBlocks v1.0RC2 and Windows XP