Page 10 - DCAP408_WEB_PROGRAMMING
P. 10
Windows Programming
Notes 1.2 How Windows Program Work
To generate a basic application, you will initially require a compiler that executes on a Microsoft
Windows operating system. Even though you can apply Win32 on numerous languages involving
Pascal (namely Borland Delphi), we will utilize only one language. Actually the Win32 library
is written in C, which is also the main language of the Microsoft Windows operating systems.
Generating a Win32 Program
All Win32 programs chiefly appear the same and act the same but, just like C++ programs, there
are small differences in terms of forming a program, relying on the compiler you are utilizing.
Here we will be testing our programs on Borland C++ Builder, Microsoft Visual C++, and
Microsoft Visual C++.NET.
For a fundamental Win32 program, the contents of a Win32 program are similar. You will feel
a dissimilarity only when you begin adding some objects known as resources. To create a Win32
program by means of Borland C++ Builder, you must generate a console application by means
of the Console Wizard. You must confirm you don’t choose any alternative from the Console
Wizard dialog box. After clicking OK, you are presented with a semi-empty file that contains
only the inclusion of the windows.h library and the WinMain() function declaration. From there,
you are prepared. From most surroundings used, Borland C++ builder is the only one that offers
the simplest, but also unluckily the emptiest template to generate a Win32 application. It doesn’t
offer any real template nor any aid on what to do with the specified file. In protection of the
Borland C++ Builder, as you will observe with Microsoft Visual C++ and the other environments
may fill your file with statements you don’t require, you don’t like, or you don’t want.
Notes Borland C++ Builder offers the empty file so you can liberally decide how you want
to generate you program and what you want to comprise in your program. This signifies
that we agree with Borland C++ Builder offering an empty file since at least the syntax of
the WinMain() function is provided to you.
Practical Learning: Windows Programming
1. Begin Borland C++ Builder
2. On the main menu, click File-> New... or File -> New -> Other...
3. In the New Items dialog box, click Console Wizard and click OK
4 LOVELY PROFESSIONAL UNIVERSITY