C++ codes to hide/close background command processor window.

C++ codes to hide/close background command processor window.

This is a piece of ready-made source codes in C++ which outputs
a standard windows message box.

[msgbox.c]
#include <windows.h>

int main()
{

int WINAPI
WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR pszCmdLine, int iCmdShow);
{
MessageBox(NULL, "This Software is Authorised.", "Service:", MB_OK);
exit(0);
}

return 0;
}

On execution of msgbox.exe ,a command processor window appears
and stays in the background.
Can I get some help to put C++ codes in msgbox.c to hide/close
the background command processor window.

Thanx in anticipation ,


(youngstar)
you must have created a windows console application.
create a win32 application and no window will come in the background.

do this:
new project->win32->empty project
when the project is created, add one file, paste this code and compile and run.
Topic archived. No new replies allowed.