0% found this document useful (0 votes)
3 views

Windows Programming Basics

This document provides an overview of Windows programming basics, focusing on API function calls and program structures, particularly the classical structure with one main window. It explains the importance of API functions in interacting with the operating system and peripheral devices, and introduces the concept of message-processing procedures for window management. Additionally, it discusses the flat memory addressing model used in Windows programming, which allows for flexible memory management in Assembly language.

Uploaded by

Vundek
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Windows Programming Basics

This document provides an overview of Windows programming basics, focusing on API function calls and program structures, particularly the classical structure with one main window. It explains the importance of API functions in interacting with the operating system and peripheral devices, and introduces the concept of message-processing procedures for window management. Additionally, it discusses the flat memory addressing model used in Windows programming, which allows for flexible memory management in Assembly language.

Uploaded by

Vundek
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Windows Programming Basics

Overview
In this chapter, I cover the two aspects most important for everyone who is going
to
start programming for Windows in Assembly language. These are application
programming interface (API) function calls and possible structures of Windows
programs.[i] There are several types of program structures, conventionally
classified
as follows:[ii]
� Classical structure�The structure with one main window.
� Dialog structure�The main window is a dialog box.
Console application�The main window is the console window (either created or
inherited).

� Nonwindowing structure�A Windows application that has no main window[ii.i]
� Services�Specialized programs that play a specific role in the operating system.
� Drivers�Specialized programs for controlling peripheral devices.
In this chapter, the main attention will be concentrated on the first (classical)
program
structure.
Well, let me start by explaining several fundamental concepts of Windows
programming. Those of you who already have some experience in the field of Windows
programming can skip this material.
Windows programming is based on the calls to API functions. The number of
such functions is about 2,000. Most of your program will consist of such calls.
All interaction with peripheral devices and operating system resources will be
carried out using these functions.

The list of API functions and their descriptions can be found in the WIN32.HLP
file, which is supplied, for example, with the Borland C++ compiler.

In the Windows environment, the main element of the program is its window.
For every window, a special message-processing procedure[i] must be defined.
More information on this topic will be provided later.

A window can contain various controls: command buttons, drop-down lists, edit
fields, etc. Principally, these controls also represent windows with special
properties. All events related to the window controls and to the window itself
dispatch messages to the window procedure.

Windows uses flat memory addressing. In other words, the entire memory space
can be considered one segment. For the programmer writing programs in
Assembly language, this means that the address of any memory cell will be
defined by the content of a single 32-bit register (e.g., EBX).

As a consequence of the previous statement, there are practically no limitations
to the size of the data, code, or stack (the size of the local variables). Segments
now play another role in the program text. They allow you to specify certain
properties for individual code sections.

You might also like