Topic:WINAPI Programming

From Wikiversity
Jump to: navigation, search

This example simply displays a message box after compiling and runing the project..

#include<windows.h>

int _stdcall WinMain (HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmd, int nShow)

{

MessageBox (NULL, TEXT("Hello"), TEXT("Hello, Windows!"), MB_OK); return 0;

}

Note: You may need to include the user32.lib for the linker when compiling this project...

See also [edit]