Object-Oriented Programming for Windows 95 and NT

Creating windows and dialog boxes is the first stage in the development of any application. The next stage is to add items to each window so that it has some practical function. This chapter looks at controls: the buttons, list boxes and other features that are added to any standard Windows application.
The many different types of object that are placed on windows are described under the general term control. There are a number of standard controls with which any Windows user will be familiar:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
These controls are described below. In addition, you can use ActiveX controls, additional custom controls that you can design yourself or are supplied by third-party software developers.
Technically speaking, controls are types of windows. Each of the standard controls listed above has a class that is derived from the CWndor TWinControlclass (or similar classes in other development environments). Although a control may not look like a window, in fact it shares many properties. Controls have a position (a pair of coordinates), height, width, background color, and caption text; they respond to some of the same events as normal windows, such as clicking, or receiving and losing the focus. As far as Windows is concerned, a control is a child window.
This may appear confusing at first but if...