Object-Oriented Programming for Windows 95 and NT

Chapter 5: Windows and Dialog Boxes

Overview

The basis of any Windows application is, unsurprisingly, its windows and the actions that can be carried out within them. This chapter looks at the definition of the term "window" and the impact of that on Windows programming, as well as the logic behind window classes and their use in a project.

Types of Windows

To most people, a "window" is a rectangular area on the screen, with all the usual features (control-menu box, title bar, minimize and maximize buttons, scroll bars and so on). However, theoretically at least, all visual interface elements windows, dialog boxes and controls are a type of window.

This is because all these elements are derived from the same base class: CWnd for the Microsoft Foundation Class Library and TWinControl in the Delphi Object Hierarchy. Even though they are redefined in some way at each stage of the class hierarchy, they still all have some common features that can be traced back to their common ancestry.

To avoid confusion, discussion in the remainder of this book will assume that the term "window" refers to the common-sense idea of a window: a rectangle displayed on screen, containing elements such as control-menu box, title bar, minimize and maximize buttons, scroll bars and interior controls.

In order to classify as a window, an object should have the ability to resize itself in some way:

  • Resizing by dragging the window borders or corners

  • Minimizing to an icon or maximizing to full-screen via the...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Window Operators
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.