Extending a Display Driver with the DDGPE Classes (Windows CE 5.0)
This topic describes the steps required to extend your display driver using the DirectDraw Graphics Primitive Engine (DDGPE) C++ classes. The DDGPE C++ classes extend the functionality of GPE to support the inclusion of a DirectDraw hardware abstraction layer (DDHAL). To add this functionality, you will need to make some minor changes to your source code.
Before you begin, you need to know the location of the following:
- The build file containing information to link your device driver to Gpe.lib, usually called sources.
- The header file containing your device-specific declaration of a GPE-derived class.
- The source code file containing the constructor of the device-specific derivation of the GPE class, along with any other files that include the Gpe.h header file.
- Any header files containing the device-specific derivation of the DDGPESurf Class.
- Any source code files referencing the GPESurf class directly, for example, constructors for any derived classes.
To extend a display driver with the DDGPE classes
Place Ddgpe.lib in the appropriate library directory path, and put Ddgpe.h in the appropriate header directory path.
Make the changes in your build file to link to Ddgpe.lib, in addition to Gpe.lib, which should already exist. Depending on your build environment, you may need to add Ddgpe.lib as one of your SOURCELIB entries, in order for HALInit to be exported properly by your linker.
Change the header file defining your device-specific class to derive directly from DDGPE instead of from GPE.
Make any necessary changes to your constructors or other functions to accommodate this change of base class. Change the files that include Gpe.h to include Gdgpe.h.
Change any header files deriving from the GPESurf class, these may or may not be present in your display driver, to derive from DDGPESurf.
Modify your source code to accommodate this change of base class. You should be sure that your code always refers to DDGPESurf where it would normally refer to GPESurf.
Recompile your display driver and test it to be sure that it still works properly.
When you have verified that it continues to work properly, continue to the next topic, DDHAL Functionality Implementation.
See Also
DirectDraw Display Driver Creation
Send Feedback on this topic to the authors