The simplest "app" possible in Windows is a message box...
#include <windows.h>
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{ MessageBox(NULL, "\tHello World!", "My first windows app", NULL);
return 0;
}
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);
Outputs Hello World! with a message box title of "My first windows app"
hInstance - is a handle to your applications instance, where an instance can be considered to be a single run of your application.
The instance is used by windows as a reference to your application for event handling, message processing, and various other duties.
hPrevInstance - is always NULL.
lpCmdLine - is a pointer string that is used to hold any command-line arguments that may have been specified when the application began.
For example, if the user opened the Run application and typed myapp.exe myparameter 1, then lpCmdLine would be myparameter 1.
nShowCMD - is the parameter that determines how your application's window will be displayed once it begins executing.
return 0 returns an error code indicating OK