·  MinGW – Create Application – C – Windows Application – WinAPI

 

- Info:

  - This tutorial shows how to use MinGW tocreate simple MessageBox window.

  - Tutorial is based on http://zetcode.com/tutorials/winapi/firststeps/

 

- Procedure:

  - Create C:\temp\WinAPI\CreateMessageBox.c

  - MSDOS – cd C:\temp\WinAPI – gcc CreateMessageBox.c

  - a.exe

 

    CreateMessageBox.c

    #include <windows.h>

    

    int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int CmdShow) {

        MessageBox(NULL, TEXT("First Program"), TEXT("First"), MB_OK );

        return 0;

    }