What is a Microsoft Window?

In this part of the series we look at the meaning of a Microsoft Windows from a technical point of view.
Getting to know Windows - Part 2
Volume - Windows User Interface Introduction
This is part 2 of my series, Getting to know Windows. I assume that you have read all the required previous parts before this one. In this part of the series we look at the meaning of a Microsoft Windows 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 will be 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 it is still being produced. Those days are now gone for good. I do not think any programmer will write an application today, 2011, for the ordinary user without using windows.
No user today wants an application that he will 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 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 will 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.
Windows Elements
To continue, you will open the following link in a new tab window; you will be toggling between that window tab and this one as you read:
http://www.cool-mathematics.biz/diagrams/windowElements.png
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 appplication whose client areas receive input from the user. Read on! Now the 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, processes it and then displays the processed result, which is now 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 was just a remark.
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.
The Windows API Volumes
These volumes I am producing are the first of their kind. You will find the same information (and even more) in the Microsoft web site. However, the information there has been written for experienced programmers like us; not for people who are learning programming (novice). What you will see in that web site are not tutorials. What you have in these volumes, are tutorials, which you have free.
Those of us who write (publish) for the Internet, write for money. We get our earnings through the advertisements you see on our web pages like this one. So please, do click the advertisements on my pages to know what my partners are advertising. In that way they pay me on your behalf, for advertising their products. If you do not click the advertisements of the Internet articles, they will not pay us. I know you are getting the stuff free, but do click the advertisements to enable us continue to write. Thanks.
We are at the end of this part of the series. Remember, an application can have more than one window. We have only talk about the main window. An application has at least one window, which is the main window.
I find the project of writing these volumes exciting and I hope you find it exciting too. At the end of the project, I will go to an entertainment spot and celebrate the completion. I hope you do the same in your area when you finished reading the volumes. The volumes are on the essential features of Windows API.
We can stop here for now. Rendezvous in the next part of the series.
Chrys
To arrive at any of the parts of this series, just type the corresponding title below in the Search Box of this page and click Search (use menu if available):
Getting to know Windows
What is a Microsoft Window?
Basics of Window Classes
Window Procedure Basics
Message Basics for Window Class Procedure
Basics of Message Handling in Windows
Creating Window Basics
Basic Coding of Window Class Procedure
Your first Window

0 comments:

Post a Comment

free counters
Related Posts Plugin for WordPress, Blogger...