The COLLECT sample illustrates a variety of the collection classes offered by the Microsoft Foundation Class Library for Windows CE (MFC CE).
The MFC collection classes can be classified according to shape and design, as follows:
Shapes:
Designs:
The COLLECT sample illustrates nine of these collections classes, representing a diverse combination of shapes and designs. Because the CTypedPtrArray and CTypedPtrList template-based collections are used differently, depending on whether they are being used to hold pointers to CObjects or to non-CObjects, the COLLECT sample illustrates both cases.
The nine collections illustrated by COLLECT are:
Shapes | Non-Template Based | Template-Based Simple Elements | Template-Based TypeSafe Pointers |
---|---|---|---|
List | CStringList | CList | CTypedPtrList
(of pointers) |
Array | CWordArray | CArray | CTypedPtrArray (of CObjects) |
Map | CMapStringToString | CMap | CTypedPtrMap |
Additional COLLECT Features
In addition to illustrating the MFC collection classes, COLLECT also illustrates:
The Example menu lists the nine collection class illustrations. Each example presents a form view that exercises many of the common collection operations:
This sample demonstrates the following keywords:
You can find the COLLECT project files in the Wce\Samples\Mfc\COLLECT directory.
For information on the Windows CE platforms that support this sample, see MFC for Windows CE Samples.