In addition to C data types, Windows has its own types for use with the many Windows functions. Windows data types are defined in the WINDOWS.H include file. This file is an ordinary C-language file that contains definitions for all the Windows special constants, data structures, functions, and variables. You must include the WINDOWS.H file in each source file.
Some of the more common data types you'll encounter in a Windows program are listed in Table B.1.
Table 0.1 Windows Data Types
Type | Description |
BYTE | unsigned char |
DWORD | unsigned long |
HANDLE | unsigned int |
HWND | handle to a window |
LONG | signed long |
WORD | unsigned int |
In addition to its own data types, Windows makes extensive use of structures. Some of the more common structures are listed in Table B.2.
Table 0.2 Windows Data Structures
Structure | Description |
MSG | input message |
PAINTSTRUCT | paint structure used to draw a window |
RECT | rectangle |
WNDCLASS | window class |