In like fashion, a variety of handles are defined for use with different Windows elements. Like constants, the handle types use all uppercase identifiers. Table 2.5 shows a few examples.
Table 2.5: Five Handle Identifiers
Handle type | Examples | Meaning |
HANDLE | hnd or hdl | Generic handle |
HWND | hwnd or hWnd | Window handle |
HDC | hdc or hDC | Device-context handle (CRT) |
HBRUSH | hbr or hBrush | Paint brush handle |
HPEN | hpen or hPen | Drawing pen handle |
This chapter has introduced many of the basic components of a Windows program, using the WinHello and Template demos as examples (these demos are on the CD that accompanies this book). Now, we will go into the details of Windows 98 application programming, beginning with message handling.