Book Image

C++ Application Development with Code::Blocks

By : BIPLAB MODAK, Biplab Kumar Modak
Book Image

C++ Application Development with Code::Blocks

By: BIPLAB MODAK, Biplab Kumar Modak

Overview of this book

Table of Contents (13 chapters)

First Windows app


Following the tradition of Hello World app, we'll create our first Windows app. To do so perform the following steps:

  1. Go to File | New | Project… menu option. Choose the Win32 GUI project option as in the following screenshot and click on the Go button:

  2. Click on the Next button on the first page of wizard as shown in the following screenshot. Choose Frame based option and click on the Next button. Dialog based apps can't contain menu bar or a toolbar. So we are choosing Frame based app.

  3. Enter App9 as project title and choose folder to create project. Now click on the Next button and then click on the Finish button to complete the wizard.

  4. Replace code inside the main.cpp file with following code:

    #include <windows.h>
    
    int WINAPI WinMain(HINSTANCE thisInstance,
                       HINSTANCE prevInstance,
                       LPSTR     commandLine,
                       int       cmdShow
                       )
    {
        MessageBox(NULL, "Hello World!", "Title", MB_OK | MB_ICONINFORMATION...