Data Types
This topic lists the data types most commonly used in the Microsoft Foundation Class Library. most of the data types are exactly the same as those in the Windows software development kit (SDK), while others are unique to MFC.
Commonly used Windows SDK and MFC data types are as follows:
- BoolA boolean value.
- BSTRA 32-bit character pointer.
- ByteAn 8-bit integer that is not signed.
- ColorrefA 32-bit value used as a color value.
- DWORDA 32-bit unsigned integer or the address of a segment and its associated offset.
- LongA 32-bit signed integer.
- LparamA 32-bit value passed as a parameter to a window procedure or callback function.
- LpcstrA 32-bit pointer to a constant character string.
- LpstrA 32-bit pointer to a character string.
- LpctstrA 32-bit pointer to a constant character string that is portable for Unicode and DBCS.
- LptstrA 32-bit pointer to a character string that is portable for Unicode and DBCS.
- LpvoidA 32-bit pointer to an unspecified type.
- LresultA 32-bit value returned from a window procedure or callback function.
- UintA 16-bit unsigned integer on Windows versions 3.0 and 3.1; a 32-bit unsigned integer on win32.
- WndprocA 32-bit pointer to a window procedure.
- WordA 16-bit unsigned integer.
- WparamA value passed as a parameter to a window procedure or callback function: 16 bits on Windows versions 3.0 and 3.1; 32 bits on win32.
Data Types unique to the Microsoft Foundation Class Library include the following:
- PositionA value used to denote the position of an element in a collection; used by MFC collection classes.
- LpcrectA 32-bit pointer to a constant (nonmodifiable)RectStructure.