How to stop displaying the console?

Hello, I am trying to display a messagebox, but instead of just displaying the message box, there is also a console the pops up. How do I prevent the console from popping up? I'm using Visual Studio 2012. I'm creating an empty project, but I still get the console.
Last edited on
a simple way GUI app instead of console app

Properties -> Configuration Properties -> Linker -> System -> SubSystem -> Windows (/SUBSYSTEM:WINDOWS)


1
2
3
4
5
6
7
#include <windows.h>

int WINAPI WinMain(HINSTANCE inst,HINSTANCE prev,LPSTR cmd,int show)
{
  // program starts here
  return 0;
}
Last edited on
Topic archived. No new replies allowed.