The data types in the following list are keywords that define the size and meaning of parameters and return values associated with Windows functions. This list contains character, integer, and Boolean types, pointer types, and handles. The character, integer, and Boolean types are common to most C compilers. Most of the pointer-type names begin with either a P prefix (for short pointers) or an LP prefix (for long pointers). A short pointer accesses data within the current data segment; a long pointer contains a 32-bit segment/offset value. A Windows application uses a handle to refer to a resource that has been loaded into memory. Windows provides access to these resources through internally maintained tables that contain individual entries for each handle. Each entry in the handle table contains the address of the resource and a means of identifying the resource type. The Windows data types are defined in the following list:
GLOBALHANDLE |
Handle to global memory. It is a 16-bit index to a block of mem-ory allocated from the system's global heap. |
HANDLE |
General handle. It represents a 16-bit index to a table entry that identifies program data. |
HBITMAP |
Handle to a physical bitmap. It is a 16-bit index to GDI's physical drawing objects. |
HBRUSH |
Handle to a physical brush. It is a 16-bit index to GDI's physical drawing objects. |
HCURSOR |
Handle to a cursor resource. It is a 16-bit index to a resource-table entry. |
HDC |
Handle to a display context. It is a 16-bit index to GDI's device-context tables. |
HFONT |
Handle to a physical font. It is a 16-bit index to GDI's physical drawing objects. |
HICON |
Handle to an icon resource. It is a 16-bit index to a resource-table entry. |
HMENU |
Handle to a menu resource. It is a 16-bit index to a resource-table entry. |
HPALETTE |
Handle to a logical palette. It is a 16-bit index to GDI's physical drawing objects. |
HPEN |
Handle to a physical pen. It is a 16-bit index to GDI's physical drawing objects. |
HRGN |
Handle to a physical region. It is a 16-bit index to GDI's physical drawing objects. |
HSTR |
Handle to a string resource. It is a 16-bit index to a resource-table entry. |
int |
Signed 16-bit integer. |
LOCALHANDLE |
Handle to local memory. It is a 16-bit index to a block of memory allocated from the application's local heap. |
long |
Signed 32-bit integer. |
LONG |
Signed 32-bit integer. |
LPBITMAP |
Long pointer to a BITMAP data structure. |
LPBITMAPCOREHEADER |
Long pointer to a BITMAPCOREHEADER data structure. |
LPBITMAPCOREINFO |
Long pointer to a BITMAPCOREINFO data structure. |
LPBITMAPFILEHEADER |
Long pointer to a BITMAPFILEHEADER data structure. |
LPBITMAPINFO |
Long pointer to a BITMAPINFO data structure. |
LPBITMAPINFOHEADER |
Long pointer to a BITMAPINFOHEADER data structure. |
LPCOMPAREITEMSTRUCT |
Long pointer to a COMPAREITEMSTRUCT data structure. |
LPCREATESTRUCT |
Long pointer to a CREATESTRUCT data structure. |
LPDELETEITEMSTRUCT |
Long pointer to a DELETEITEMSTRUCT data structure. |
LPDRAWITEMSTRUCT |
Long pointer to a DRAWITEMSTRUCT data structure. |
LPHANDLETABLE |
Long pointer to a HANDLETABLE data structure. |
LPINT |
Long pointer to a signed 16-bit integer. |
LPLOGBRUSH |
Long pointer to a LOGBRUSH data structure. |
LPLOGFONT |
Long pointer to a LOGFONT data structure. |
LPLOGPALETTE |
Long pointer to a LOGPALETTE data structure. |
LPLOGPEN |
Long pointer to a LOGPEN data structure. |
LPMEASUREITEMSTRUCT |
Long pointer to a MEASUREITEMSTRUCT data structure. |
LPMETAFILEPICT |
Long pointer to a METAFILEPICT data structure. |
LPMSG |
Long pointer to a MSG data structure. |
LPOFSTRUCT |
Long pointer to an OFSTRUCT data structure. |
LPPAINTSTRUCT |
Long pointer to a PAINTSTRUCT data structure. |
LPPALETTEENTRY |
Long pointer to a PALETTEENTRY data structure. |
LPPOINT |
Long pointer to a POINT data structure. |
LPRECT |
Long pointer to a RECT data structure. |
LPRESOURCELIST |
Long pointer to one or more RESOURCESTRUCT data structures. |
LPSTR |
Long pointer to a character string. |
LPTEXTMETRIC |
Long pointer to a TEXTMETRIC data structure. |
LPVOID |
Long pointer to an undefined data type. |
LPWNDCLASS |
Long pointer to a WNDCLASS data structure. |
NEAR |
Data-type attribute that can be used to create a short pointer. |
NPSTR |
Near pointer to a character string. |
PINT |
Pointer to a signed 16-bit integer. |
PSTR |
Pointer to a character string. |
PWORD |
Pointer to an unsigned 16-bit integer. |
short |
Signed 16-bit integer. |
void |
Empty value. It is used with a function to specify no return value. |
WORD |
Unsigned 16-bit integer. |