I have a WINMAIN application say hello world.
i used
-mwindows
switch option in linker to make sure it does GUI application. But when i execute some system commands like
system("dir");
from the C code it pops out a console.
Is there a option to supress the console window??
Please guide. Below is the hello world code using Mingw GCC
#include <windows.h>
int WINAPI
WinMain (HINSTANCE hInstance, HINSTANCE hPrevInst, LPTSTR lpCmdLine, int nShowCmd)
{
MessageBoxW (NULL, L"Hello World!", L"hello", MB_OK | MB_ICONINFORMATION);
system("dir");
system("dir");
system("dir");
system("dir");
Sleep(1000);
return 0;
}