Broad Network


What is a Microsoft Window

Getting to know Windows – Part 2

Volume - Windows User Interface

Forward: In this part of the series we look at the meaning of a Microsoft Windows from a technical point of view.

By: Chrysanthus Date Published: 28 Aug 2012

Introduction

This is part 2 of my series, Getting to know Windows. I assume that you have read the previous parts before reaching here. In this part of the series we look at the meaning of a Microsoft Window from a technical point of view.

Note: If you cannot see the code or if you think anything is missing (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.

Desktop Window
Assume that your computer is off. When you put it on, a window is created that fills almost the entire screen. In theory, this window cannot be seen. The desktop window uses what is known as a bitmap to paint its background. When it is painted, you see a rectangular image covering almost the entire screen. The desktop window is the base for all other windows that applications display. An example of an application is Microsoft Word (word processor). You must have written short applications (programs) as you covered, my prerequisite tutorials mentioned in the previous part of the series.

Graphical User Interface
In the past (80’s and early 90’s) programs were written for the console, no windows at all. You just had text. If you were lucky you would have colored text. We started seeing windows in the form of word processors. There was a famous word processor called, Word Perfect. I cannot tell if that is still being produced. Those days are now gone for good. I do not think any programmer will write an application today, 2012, for the ordinary user without using windows. So, learning how to code windows is a must for any series programmer, today.

No user today wants an application that he would access without windows. Programmers like you and me though, still use the console, or better, the command prompt, especially when we are dealing with C++. However, the final program (application), if it is meant for the ordinary user, has to present itself in windows. That is why you have this volume. All those windows, which the user uses to access the program, form what is known as the Graphical User Interface.

Application Window
Any application today, written for the Microsoft Windows API, has at least one main window, called the Main Window. Many applications have more than one window, which includes the main window. When you start an application, the main window is displayed first. You see its button representation at the task bar. No button that represents the other windows of the application should appear in the taskbar.

A button is either pushed or not pushed. When the main window is active, its representation button in the taskbar is in the pushed state.

http://www.broad-network.com/ChrysanthusForcha/windowElements.png

Window Elements
To continue, you will open the above link in a new tab window; you will be toggling between that window tab and this one as you read:

The diagram in the opened tab window shows a typical main window. At the very top, you have the Title Bar. The title bar has the icon of the application, the title of the window, the Minimize, Maximize (Restore) and close buttons. Below that you have the Menu Bar (or the Window Menu). The user can drop down menus from the menu bar by clicking a menu bar item. Identify the Vertical Scroll Bar, the Horizontal Scroll Bar, Status Bar and the Sizing Border in the figure.

The Client Area
The output of the main window is displayed in the Client Area. Output here consists mainly of text and graphics (images). Identify the client area in the figure of the opened tab window if you have not already done so.

It will not surprise me, if at this point you argue that you have seen word processors, web pages, or some other applications whose client areas receive input from the user. Read on! Now, the common devices to input data to an application (computer) today, are the keyboard and the mouse. I hope from this you get the idea that nothing is inputted at the client area. Now each window must have a procedure code (function code), which you have to write. This window procedure receives what you type on your keyboard or do with your mouse; it processes it and then displays the processed result, which is output, at the client area. I hope you are now convinced that the client area does not receive input (from a technical point of view). The procedure is very important. It is called the Window Procedure.

The title bar, menu bar, window menu, minimize and maximize buttons, sizing border, and scroll bars are not in the window’s client area. They are referred to collectively as the window's Nonclient Area. Everything else is in the window’s client area.

Now, you may ask: what about the tools bar you have been seeing in applications? The tool bar and other bars you have been seeing in word processors, web pages and other applications, occupy part of the client area.

Some years back I was teaching computer literacy in a computer institute. I approached the teaching of windows differently from what I am doing now. Then, I was teaching people who do not know programming and who did not have technical knowledge in computers. I just described everything above the visible client area as horizontal bars. I said that some bars like the tool bar are optional. You, learning Windows API now, is someone who knows the basics of a high-level computer language, and should know the meaning and basic functions of computer hardware components such as memory, hard disk, and microprocessor. As we go along, I will be emphasizing on issues that I would not emphasis to the layman. All that is a remark, you should take seriously, as you cover the volumes.

The operating system manages most aspects of the nonclient area; the application manages most aspects of the client area.

Name of Application
The name of your application is typically the title in the title bar just after the icon that identifies the application. The icon is like the logo of the application. Note: the title of a window can also be the purpose of the window; remember your application can have more than one window.

You now know what a window is, from a technical point of view. You also know that an application can have more than one window, and it will always have a main window.

We can stop here for now. Rendezvous in the next part of the series.

Chrys

Related Courses

C++ Course
Relational Database and Sybase
Windows User Interface
Computer Programmer – A Jack of all Trade – Poem
NEXT

Comments

Become the Writer's Fan
Send the Writer a Message